var xb=Object.defineProperty;var Lg=t=>{throw TypeError(t)};var Sb=(t,e,n)=>e in t?xb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Sb(t,typeof e!="symbol"?e+"":e,n),od=(t,e,n)=>e.has(t)||Lg("Cannot "+n);var N=(t,e,n)=>(od(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?Lg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,s)=>(od(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Ae=(t,e,n)=>(od(t,e,"access private method"),n);var gl=(t,e,n,s)=>({set _(o){te(t,e,o,n)},get _(){return N(t,e,s)}});function Eb(t,e){for(var n=0;ns[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Ff(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ad={exports:{}},mo={},ld={exports:{}},ke={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Mg;function bb(){if(Mg)return ke;Mg=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function w(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function x(L,$,de){this.props=L,this.context=$,this.refs=E,this.updater=de||b}x.prototype.isReactComponent={},x.prototype.setState=function(L,$){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,$,"setState")},x.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=x.prototype;function R(L,$,de){this.props=L,this.context=$,this.refs=E,this.updater=de||b}var P=R.prototype=new S;P.constructor=R,k(P,x.prototype),P.isPureReactComponent=!0;var O=Array.isArray,j=Object.prototype.hasOwnProperty,V={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function B(L,$,de){var ge,pe={},X=null,Ee=null;if($!=null)for(ge in $.ref!==void 0&&(Ee=$.ref),$.key!==void 0&&(X=""+$.key),$)j.call($,ge)&&!q.hasOwnProperty(ge)&&(pe[ge]=$[ge]);var Re=arguments.length-2;if(Re===1)pe.children=de;else if(1>>1,$=Q[L];if(0>>1;Lo(pe,z))X<$&&0>o(Ee,pe)?(Q[L]=Ee,Q[X]=z,L=X):(Q[L]=pe,Q[ge]=z,L=ge);else if(X<$&&0>o(Ee,z))Q[L]=Ee,Q[X]=z,L=X;else break e}}return se}function o(Q,se){var z=Q.sortIndex-se.sortIndex;return z!==0?z:Q.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var f=[],p=[],g=1,y=null,w=3,b=!1,k=!1,E=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(Q){for(var se=n(p);se!==null;){if(se.callback===null)s(p);else if(se.startTime<=Q)s(p),se.sortIndex=se.expirationTime,e(f,se);else break;se=n(p)}}function O(Q){if(E=!1,P(Q),!k)if(n(f)!==null)k=!0,Te(j);else{var se=n(p);se!==null&&ce(O,se.startTime-Q)}}function j(Q,se){k=!1,E&&(E=!1,S(B),B=-1),b=!0;var z=w;try{for(P(se),y=n(f);y!==null&&(!(y.expirationTime>se)||Q&&!ve());){var L=y.callback;if(typeof L=="function"){y.callback=null,w=y.priorityLevel;var $=L(y.expirationTime<=se);se=t.unstable_now(),typeof $=="function"?y.callback=$:y===n(f)&&s(f),P(se)}else s(f);y=n(f)}if(y!==null)var de=!0;else{var ge=n(p);ge!==null&&ce(O,ge.startTime-se),de=!1}return de}finally{y=null,w=z,b=!1}}var V=!1,q=null,B=-1,Y=5,ne=-1;function ve(){return!(t.unstable_now()-neQ||125L?(Q.sortIndex=z,e(p,Q),n(f)===null&&Q===n(p)&&(E?(S(B),B=-1):E=!0,ce(O,z-L))):(Q.sortIndex=$,e(f,Q),k||b||(k=!0,Te(j))),Q},t.unstable_shouldYield=ve,t.unstable_wrapCallback=function(Q){var se=w;return function(){var z=w;w=se;try{return Q.apply(this,arguments)}finally{w=z}}}})(dd)),dd}var Ug;function Pb(){return Ug||(Ug=1,cd.exports=Cb()),cd.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Vg;function kb(){if(Vg)return Mt;Vg=1;var t=jf(),e=Pb();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function w(r){return f.call(y,r)?!0:f.call(g,r)?!1:p.test(r)?y[r]=!0:(g[r]=!0,!1)}function b(r,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,i,a,c){if(i===null||typeof i>"u"||b(r,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function E(r,i,a,c,h,m,v){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=m,this.removeEmptyString=v}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){x[r]=new E(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];x[i]=new E(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){x[r]=new E(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){x[r]=new E(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){x[r]=new E(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){x[r]=new E(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){x[r]=new E(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){x[r]=new E(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){x[r]=new E(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(S,R);x[i]=new E(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(S,R);x[i]=new E(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(S,R);x[i]=new E(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){x[r]=new E(r,1,!1,r.toLowerCase(),null,!1,!1)}),x.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){x[r]=new E(r,1,!1,r.toLowerCase(),null,!0,!0)});function P(r,i,a,c){var h=x.hasOwnProperty(i)?x[i]:null;(h!==null?h.type!==0:c||!(2_||h[v]!==m[_]){var A=` `+h[v].replace(" at new "," at ");return r.displayName&&A.includes("")&&(A=A.replace("",r.displayName)),A}while(1<=v&&0<=_);break}}}finally{de=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?$(r):""}function pe(r){switch(r.tag){case 5:return $(r.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case q:return"Fragment";case V:return"Portal";case Y:return"Profiler";case B:return"StrictMode";case Se:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ve:return(r.displayName||"Context")+".Consumer";case ne:return(r._context.displayName||"Context")+".Provider";case Ce:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case _e:return i=r.displayName||null,i!==null?i:X(r.type)||"Memo";case Te:i=r._payload,r=r._init;try{return X(r(i))}catch{}}return null}function Ee(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(i);case 8:return i===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function xe(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function it(r){var i=xe(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(v){c=""+v,m.call(this,v)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(v){c=""+v},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Kt(r){r._valueTracker||(r._valueTracker=it(r))}function ct(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return r&&(c=xe(r)?r.checked?"true":"false":r.value),r=c,r!==a?(i.setValue(r),!0):!1}function ln(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Qt(r,i){var a=i.checked;return z({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Gt(r,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Re(i.value!=null?i.value:a),r._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function be(r,i){i=i.checked,i!=null&&P(r,"checked",i,!1)}function dt(r,i){be(r,i);var a=Re(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?cn(r,i.type,a):i.hasOwnProperty("defaultValue")&&cn(r,i.type,Re(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function un(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function cn(r,i,a){(i!=="number"||ln(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var er=Array.isArray;function tr(r,i,a,c){if(r=r.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=la.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Ai(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var Oi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},T1=["Webkit","ms","Moz","O"];Object.keys(Oi).forEach(function(r){T1.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Oi[i]=Oi[r]})});function Gh(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||Oi.hasOwnProperty(r)&&Oi[r]?(""+i).trim():i+"px"}function Xh(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=Gh(a,i[a],c);a==="float"&&(a="cssFloat"),c?r.setProperty(a,h):r[a]=h}}var _1=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vu(r,i){if(i){if(_1[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function wu(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function Su(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Eu=null,As=null,Os=null;function Yh(r){if(r=Zi(r)){if(typeof Eu!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Oa(i),Eu(r.stateNode,r.type,i))}}function Jh(r){As?Os?Os.push(r):Os=[r]:As=r}function Zh(){if(As){var r=As,i=Os;if(Os=As=null,Yh(r),i)for(r=0;r>>=0,r===0?32:31-(I1(r)/F1|0)|0}var ha=64,pa=4194304;function Mi(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function ma(r,i){var a=r.pendingLanes;if(a===0)return 0;var c=0,h=r.suspendedLanes,m=r.pingedLanes,v=a&268435455;if(v!==0){var _=v&~h;_!==0?c=Mi(_):(m&=v,m!==0&&(c=Mi(m)))}else v=a&~h,v!==0?c=Mi(v):m!==0&&(c=Mi(m));if(c===0)return 0;if(i!==0&&i!==c&&(i&h)===0&&(h=c&-c,m=i&-i,h>=m||h===16&&(m&4194240)!==0))return i;if((c&4)!==0&&(c|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0a;a++)i.push(r);return i}function Ii(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-dn(i),r[i]=a}function V1(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0=Wi),Pp=" ",kp=!1;function Rp(r,i){switch(r){case"keyup":return mE.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ap(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ls=!1;function yE(r,i){switch(r){case"compositionend":return Ap(i);case"keypress":return i.which!==32?null:(kp=!0,Pp);case"textInput":return r=i.data,r===Pp&&kp?null:r;default:return null}}function vE(r,i){if(Ls)return r==="compositionend"||!Uu&&Rp(r,i)?(r=Sp(),xa=Lu=or=null,Ls=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-r};r=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Fp(a)}}function Bp(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Bp(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Up(){for(var r=window,i=ln();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=ln(r.document)}return i}function $u(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function PE(r){var i=Up(),a=r.focusedElem,c=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&Bp(a.ownerDocument.documentElement,a)){if(c!==null&&$u(a)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,m=Math.min(c.start,h);c=c.end===void 0?m:Math.min(c.end,h),!r.extend&&m>c&&(h=c,c=m,m=h),h=jp(a,m);var v=jp(a,c);h&&v&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==v.node||r.focusOffset!==v.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),m>c?(r.addRange(i),r.extend(v.node,v.offset)):(i.setEnd(v.node,v.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Ms=null,Wu=null,Qi=null,Hu=!1;function Vp(r,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Hu||Ms==null||Ms!==ln(c)||(c=Ms,"selectionStart"in c&&$u(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Qi&&Ki(Qi,c)||(Qi=c,c=ka(Wu,"onSelect"),0Us||(r.current=rc[Us],rc[Us]=null,Us--)}function Be(r,i){Us++,rc[Us]=r.current,r.current=i}var cr={},vt=ur(cr),At=ur(!1),Hr=cr;function Vs(r,i){var a=r.type.contextTypes;if(!a)return cr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function Ot(r){return r=r.childContextTypes,r!=null}function Na(){Ve(At),Ve(vt)}function nm(r,i,a){if(vt.current!==cr)throw Error(n(168));Be(vt,i),Be(At,a)}function rm(r,i,a){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(n(108,Ee(r)||"Unknown",h));return z({},a,c)}function Da(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||cr,Hr=vt.current,Be(vt,r),Be(At,At.current),!0}function sm(r,i,a){var c=r.stateNode;if(!c)throw Error(n(169));a?(r=rm(r,i,Hr),c.__reactInternalMemoizedMergedChildContext=r,Ve(At),Ve(vt),Be(vt,r)):Ve(At),Be(At,a)}var jn=null,La=!1,sc=!1;function im(r){jn===null?jn=[r]:jn.push(r)}function BE(r){La=!0,im(r)}function dr(){if(!sc&&jn!==null){sc=!0;var r=0,i=Fe;try{var a=jn;for(Fe=1;r>=v,h-=v,Bn=1<<32-dn(i)+h|a<we?(lt=he,he=null):lt=he.sibling;var Le=W(I,he,F[we],G);if(Le===null){he===null&&(he=lt);break}r&&he&&Le.alternate===null&&i(I,he),D=m(Le,D,we),fe===null?ue=Le:fe.sibling=Le,fe=Le,he=lt}if(we===F.length)return a(I,he),$e&&Kr(I,we),ue;if(he===null){for(;wewe?(lt=he,he=null):lt=he.sibling;var xr=W(I,he,Le.value,G);if(xr===null){he===null&&(he=lt);break}r&&he&&xr.alternate===null&&i(I,he),D=m(xr,D,we),fe===null?ue=xr:fe.sibling=xr,fe=xr,he=lt}if(Le.done)return a(I,he),$e&&Kr(I,we),ue;if(he===null){for(;!Le.done;we++,Le=F.next())Le=K(I,Le.value,G),Le!==null&&(D=m(Le,D,we),fe===null?ue=Le:fe.sibling=Le,fe=Le);return $e&&Kr(I,we),ue}for(he=c(I,he);!Le.done;we++,Le=F.next())Le=ee(he,I,we,Le.value,G),Le!==null&&(r&&Le.alternate!==null&&he.delete(Le.key===null?we:Le.key),D=m(Le,D,we),fe===null?ue=Le:fe.sibling=Le,fe=Le);return r&&he.forEach(function(wb){return i(I,wb)}),$e&&Kr(I,we),ue}function Ye(I,D,F,G){if(typeof F=="object"&&F!==null&&F.type===q&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case j:e:{for(var ue=F.key,fe=D;fe!==null;){if(fe.key===ue){if(ue=F.type,ue===q){if(fe.tag===7){a(I,fe.sibling),D=h(fe,F.props.children),D.return=I,I=D;break e}}else if(fe.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Te&&dm(ue)===fe.type){a(I,fe.sibling),D=h(fe,F.props),D.ref=eo(I,fe,F),D.return=I,I=D;break e}a(I,fe);break}else i(I,fe);fe=fe.sibling}F.type===q?(D=ts(F.props.children,I.mode,G,F.key),D.return=I,I=D):(G=ll(F.type,F.key,F.props,null,I.mode,G),G.ref=eo(I,D,F),G.return=I,I=G)}return v(I);case V:e:{for(fe=F.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===F.containerInfo&&D.stateNode.implementation===F.implementation){a(I,D.sibling),D=h(D,F.children||[]),D.return=I,I=D;break e}else{a(I,D);break}else i(I,D);D=D.sibling}D=td(F,I.mode,G),D.return=I,I=D}return v(I);case Te:return fe=F._init,Ye(I,D,fe(F._payload),G)}if(er(F))return ie(I,D,F,G);if(se(F))return le(I,D,F,G);ja(I,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,D!==null&&D.tag===6?(a(I,D.sibling),D=h(D,F),D.return=I,I=D):(a(I,D),D=ed(F,I.mode,G),D.return=I,I=D),v(I)):a(I,D)}return Ye}var Hs=fm(!0),hm=fm(!1),Ba=ur(null),Ua=null,qs=null,cc=null;function dc(){cc=qs=Ua=null}function fc(r){var i=Ba.current;Ve(Ba),r._currentValue=i}function hc(r,i,a){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===a)break;r=r.return}}function Ks(r,i){Ua=r,cc=qs=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Nt=!0),r.firstContext=null)}function Jt(r){var i=r._currentValue;if(cc!==r)if(r={context:r,memoizedValue:i,next:null},qs===null){if(Ua===null)throw Error(n(308));qs=r,Ua.dependencies={lanes:0,firstContext:r}}else qs=qs.next=r;return i}var Qr=null;function pc(r){Qr===null?Qr=[r]:Qr.push(r)}function pm(r,i,a,c){var h=i.interleaved;return h===null?(a.next=a,pc(i)):(a.next=h.next,h.next=a),i.interleaved=a,Vn(r,c)}function Vn(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var fr=!1;function mc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mm(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function zn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function hr(r,i,a){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(De&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,Vn(r,a)}return h=c.interleaved,h===null?(i.next=i,pc(c)):(i.next=h.next,h.next=i),c.interleaved=i,Vn(r,a)}function Va(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Ru(r,a)}}function gm(r,i){var a=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var v={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=v:m=m.next=v,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:c.shared,effects:c.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function za(r,i,a,c){var h=r.updateQueue;fr=!1;var m=h.firstBaseUpdate,v=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var A=_,U=A.next;A.next=null,v===null?m=U:v.next=U,v=A;var H=r.alternate;H!==null&&(H=H.updateQueue,_=H.lastBaseUpdate,_!==v&&(_===null?H.firstBaseUpdate=U:_.next=U,H.lastBaseUpdate=A))}if(m!==null){var K=h.baseState;v=0,H=U=A=null,_=m;do{var W=_.lane,ee=_.eventTime;if((c&W)===W){H!==null&&(H=H.next={eventTime:ee,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var ie=r,le=_;switch(W=i,ee=a,le.tag){case 1:if(ie=le.payload,typeof ie=="function"){K=ie.call(ee,K,W);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=le.payload,W=typeof ie=="function"?ie.call(ee,K,W):ie,W==null)break e;K=z({},K,W);break e;case 2:fr=!0}}_.callback!==null&&_.lane!==0&&(r.flags|=64,W=h.effects,W===null?h.effects=[_]:W.push(_))}else ee={eventTime:ee,lane:W,tag:_.tag,payload:_.payload,callback:_.callback,next:null},H===null?(U=H=ee,A=K):H=H.next=ee,v|=W;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;W=_,_=W.next,W.next=null,h.lastBaseUpdate=W,h.shared.pending=null}}while(!0);if(H===null&&(A=K),h.baseState=A,h.firstBaseUpdate=U,h.lastBaseUpdate=H,i=h.shared.interleaved,i!==null){h=i;do v|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);Yr|=v,r.lanes=v,r.memoizedState=K}}function ym(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var c=xc.transition;xc.transition={};try{r(!1),i()}finally{Fe=a,xc.transition=c}}function Im(){return Zt().memoizedState}function $E(r,i,a){var c=yr(r);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Fm(r))jm(i,a);else if(a=pm(r,i,a,c),a!==null){var h=kt();yn(a,r,c,h),Bm(a,i,c)}}function WE(r,i,a){var c=yr(r),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fm(r))jm(i,h);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var v=i.lastRenderedState,_=m(v,a);if(h.hasEagerState=!0,h.eagerState=_,fn(_,v)){var A=i.interleaved;A===null?(h.next=h,pc(i)):(h.next=A.next,A.next=h),i.interleaved=h;return}}catch{}finally{}a=pm(r,i,h,c),a!==null&&(h=kt(),yn(a,r,c,h),Bm(a,i,c))}}function Fm(r){var i=r.alternate;return r===He||i!==null&&i===He}function jm(r,i){so=Ha=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function Bm(r,i,a){if((a&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Ru(r,a)}}var Qa={readContext:Jt,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},HE={readContext:Jt,useCallback:function(r,i){return Cn().memoizedState=[r,i===void 0?null:i],r},useContext:Jt,useEffect:km,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,qa(4194308,4,Om.bind(null,i,r),a)},useLayoutEffect:function(r,i){return qa(4194308,4,r,i)},useInsertionEffect:function(r,i){return qa(4,2,r,i)},useMemo:function(r,i){var a=Cn();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var c=Cn();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=$E.bind(null,He,r),[c.memoizedState,r]},useRef:function(r){var i=Cn();return r={current:r},i.memoizedState=r},useState:Cm,useDebugValue:Pc,useDeferredValue:function(r){return Cn().memoizedState=r},useTransition:function(){var r=Cm(!1),i=r[0];return r=zE.bind(null,r[1]),Cn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var c=He,h=Cn();if($e){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),at===null)throw Error(n(349));(Xr&30)!==0||Sm(c,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,km(bm.bind(null,c,m,r),[r]),c.flags|=2048,ao(9,Em.bind(null,c,m,a,i),void 0,null),a},useId:function(){var r=Cn(),i=at.identifierPrefix;if($e){var a=Un,c=Bn;a=(c&~(1<<32-dn(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=io++,0<\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=v.createElement(a,{is:c.is}):(r=v.createElement(a),a==="select"&&(v=r,c.multiple?v.multiple=!0:c.size&&(v.size=c.size))):r=v.createElementNS(r,a),r[Tn]=i,r[Ji]=c,ig(r,i,!1,!1),i.stateNode=r;e:{switch(v=wu(a,c),a){case"dialog":Ue("cancel",r),Ue("close",r),h=c;break;case"iframe":case"object":case"embed":Ue("load",r),h=c;break;case"video":case"audio":for(h=0;hJs&&(i.flags|=128,c=!0,lo(m,!1),i.lanes=4194304)}else{if(!c)if(r=$a(v),r!==null){if(i.flags|=128,c=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),lo(m,!0),m.tail===null&&m.tailMode==="hidden"&&!v.alternate&&!$e)return xt(i),null}else 2*Xe()-m.renderingStartTime>Js&&a!==1073741824&&(i.flags|=128,c=!0,lo(m,!1),i.lanes=4194304);m.isBackwards?(v.sibling=i.child,i.child=v):(a=m.last,a!==null?a.sibling=v:i.child=v,m.last=v)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Xe(),i.sibling=null,a=We.current,Be(We,c?a&1|2:a&1),i):(xt(i),null);case 22:case 23:return Yc(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?($t&1073741824)!==0&&(xt(i),i.subtreeFlags&6&&(i.flags|=8192)):xt(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function ZE(r,i){switch(oc(i),i.tag){case 1:return Ot(i.type)&&Na(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Qs(),Ve(At),Ve(vt),wc(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return yc(i),null;case 13:if(Ve(We),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Ws()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ve(We),null;case 4:return Qs(),null;case 10:return fc(i.type._context),null;case 22:case 23:return Yc(),null;case 24:return null;default:return null}}var Ja=!1,St=!1,eb=typeof WeakSet=="function"?WeakSet:Set,re=null;function Xs(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Ke(r,i,c)}else a.current=null}function Bc(r,i,a){try{a()}catch(c){Ke(r,i,c)}}var lg=!1;function tb(r,i){if(Yu=va,r=Up(),$u(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var v=0,_=-1,A=-1,U=0,H=0,K=r,W=null;t:for(;;){for(var ee;K!==a||h!==0&&K.nodeType!==3||(_=v+h),K!==m||c!==0&&K.nodeType!==3||(A=v+c),K.nodeType===3&&(v+=K.nodeValue.length),(ee=K.firstChild)!==null;)W=K,K=ee;for(;;){if(K===r)break t;if(W===a&&++U===h&&(_=v),W===m&&++H===c&&(A=v),(ee=K.nextSibling)!==null)break;K=W,W=K.parentNode}K=ee}a=_===-1||A===-1?null:{start:_,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ju={focusedElem:r,selectionRange:a},va=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var ie=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var le=ie.memoizedProps,Ye=ie.memoizedState,I=i.stateNode,D=I.getSnapshotBeforeUpdate(i.elementType===i.type?le:pn(i.type,le),Ye);I.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var F=i.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){Ke(i,i.return,G)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return ie=lg,lg=!1,ie}function uo(r,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&r)===r){var m=h.destroy;h.destroy=void 0,m!==void 0&&Bc(i,a,m)}h=h.next}while(h!==c)}}function Za(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Uc(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function ug(r){var i=r.alternate;i!==null&&(r.alternate=null,ug(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Tn],delete i[Ji],delete i[nc],delete i[FE],delete i[jE])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function cg(r){return r.tag===5||r.tag===3||r.tag===4}function dg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||cg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Vc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Aa));else if(c!==4&&(r=r.child,r!==null))for(Vc(r,i,a),r=r.sibling;r!==null;)Vc(r,i,a),r=r.sibling}function zc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(zc(r,i,a),r=r.sibling;r!==null;)zc(r,i,a),r=r.sibling}var ft=null,mn=!1;function pr(r,i,a){for(a=a.child;a!==null;)fg(r,i,a),a=a.sibling}function fg(r,i,a){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(fa,a)}catch{}switch(a.tag){case 5:St||Xs(a,i);case 6:var c=ft,h=mn;ft=null,pr(r,i,a),ft=c,mn=h,ft!==null&&(mn?(r=ft,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):ft.removeChild(a.stateNode));break;case 18:ft!==null&&(mn?(r=ft,a=a.stateNode,r.nodeType===8?tc(r.parentNode,a):r.nodeType===1&&tc(r,a),Vi(r)):tc(ft,a.stateNode));break;case 4:c=ft,h=mn,ft=a.stateNode.containerInfo,mn=!0,pr(r,i,a),ft=c,mn=h;break;case 0:case 11:case 14:case 15:if(!St&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var m=h,v=m.destroy;m=m.tag,v!==void 0&&((m&2)!==0||(m&4)!==0)&&Bc(a,i,v),h=h.next}while(h!==c)}pr(r,i,a);break;case 1:if(!St&&(Xs(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(_){Ke(a,i,_)}pr(r,i,a);break;case 21:pr(r,i,a);break;case 22:a.mode&1?(St=(c=St)||a.memoizedState!==null,pr(r,i,a),St=c):pr(r,i,a);break;default:pr(r,i,a)}}function hg(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new eb),i.forEach(function(c){var h=cb.bind(null,r,c);a.has(c)||(a.add(c),c.then(h,h))})}}function gn(r,i){var a=i.deletions;if(a!==null)for(var c=0;ch&&(h=v),c&=~m}if(c=h,c=Xe()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*rb(c/1960))-c,10r?16:r,gr===null)var c=!1;else{if(r=gr,gr=null,sl=0,(De&6)!==0)throw Error(n(331));var h=De;for(De|=4,re=r.current;re!==null;){var m=re,v=m.child;if((re.flags&16)!==0){var _=m.deletions;if(_!==null){for(var A=0;A<_.length;A++){var U=_[A];for(re=U;re!==null;){var H=re;switch(H.tag){case 0:case 11:case 15:uo(8,H,m)}var K=H.child;if(K!==null)K.return=H,re=K;else for(;re!==null;){H=re;var W=H.sibling,ee=H.return;if(ug(H),H===U){re=null;break}if(W!==null){W.return=ee,re=W;break}re=ee}}}var ie=m.alternate;if(ie!==null){var le=ie.child;if(le!==null){ie.child=null;do{var Ye=le.sibling;le.sibling=null,le=Ye}while(le!==null)}}re=m}}if((m.subtreeFlags&2064)!==0&&v!==null)v.return=m,re=v;else e:for(;re!==null;){if(m=re,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:uo(9,m,m.return)}var I=m.sibling;if(I!==null){I.return=m.return,re=I;break e}re=m.return}}var D=r.current;for(re=D;re!==null;){v=re;var F=v.child;if((v.subtreeFlags&2064)!==0&&F!==null)F.return=v,re=F;else e:for(v=D;re!==null;){if(_=re,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:Za(9,_)}}catch(ue){Ke(_,_.return,ue)}if(_===v){re=null;break e}var G=_.sibling;if(G!==null){G.return=_.return,re=G;break e}re=_.return}}if(De=h,dr(),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(fa,r)}catch{}c=!0}return c}finally{Fe=a,en.transition=i}}return!1}function _g(r,i,a){i=Gs(a,i),i=$m(r,i,1),r=hr(r,i,1),i=kt(),r!==null&&(Ii(r,1,i),Lt(r,i))}function Ke(r,i,a){if(r.tag===3)_g(r,r,a);else for(;i!==null;){if(i.tag===3){_g(i,r,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(mr===null||!mr.has(c))){r=Gs(a,r),r=Wm(i,r,1),i=hr(i,r,1),r=kt(),i!==null&&(Ii(i,1,r),Lt(i,r));break}}i=i.return}}function lb(r,i,a){var c=r.pingCache;c!==null&&c.delete(i),i=kt(),r.pingedLanes|=r.suspendedLanes&a,at===r&&(ht&a)===a&&(rt===4||rt===3&&(ht&130023424)===ht&&500>Xe()-Hc?Zr(r,0):Wc|=a),Lt(r,i)}function Cg(r,i){i===0&&((r.mode&1)===0?i=1:(i=pa,pa<<=1,(pa&130023424)===0&&(pa=4194304)));var a=kt();r=Vn(r,i),r!==null&&(Ii(r,i,a),Lt(r,a))}function ub(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Cg(r,a)}function cb(r,i){var a=0;switch(r.tag){case 13:var c=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(i),Cg(r,a)}var Pg;Pg=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||At.current)Nt=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return Nt=!1,YE(r,i,a);Nt=(r.flags&131072)!==0}else Nt=!1,$e&&(i.flags&1048576)!==0&&om(i,Ia,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;Ya(r,i),r=i.pendingProps;var h=Vs(i,vt.current);Ks(i,a),h=Ec(null,i,c,r,h,a);var m=bc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Ot(c)?(m=!0,Da(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,mc(i),h.updater=Ga,i.stateNode=h,h._reactInternals=i,Rc(i,c,r,a),i=Dc(null,i,c,!0,m,a)):(i.tag=0,$e&&m&&ic(i),Pt(null,i,h,a),i=i.child),i;case 16:c=i.elementType;e:{switch(Ya(r,i),r=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=fb(c),r=pn(c,r),h){case 0:i=Nc(null,i,c,r,a);break e;case 1:i=Zm(null,i,c,r,a);break e;case 11:i=Qm(null,i,c,r,a);break e;case 14:i=Gm(null,i,c,pn(c.type,r),a);break e}throw Error(n(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:pn(c,h),Nc(r,i,c,h,a);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:pn(c,h),Zm(r,i,c,h,a);case 3:e:{if(eg(i),r===null)throw Error(n(387));c=i.pendingProps,m=i.memoizedState,h=m.element,mm(r,i),za(i,c,null,a);var v=i.memoizedState;if(c=v.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=Gs(Error(n(423)),i),i=tg(r,i,c,a,h);break e}else if(c!==h){h=Gs(Error(n(424)),i),i=tg(r,i,c,a,h);break e}else for(zt=lr(i.stateNode.containerInfo.firstChild),Vt=i,$e=!0,hn=null,a=hm(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ws(),c===h){i=$n(r,i,a);break e}Pt(r,i,c,a)}i=i.child}return i;case 5:return vm(i),r===null&&lc(i),c=i.type,h=i.pendingProps,m=r!==null?r.memoizedProps:null,v=h.children,Zu(c,h)?v=null:m!==null&&Zu(c,m)&&(i.flags|=32),Jm(r,i),Pt(r,i,v,a),i.child;case 6:return r===null&&lc(i),null;case 13:return ng(r,i,a);case 4:return gc(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=Hs(i,null,c,a):Pt(r,i,c,a),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:pn(c,h),Qm(r,i,c,h,a);case 7:return Pt(r,i,i.pendingProps,a),i.child;case 8:return Pt(r,i,i.pendingProps.children,a),i.child;case 12:return Pt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,m=i.memoizedProps,v=h.value,Be(Ba,c._currentValue),c._currentValue=v,m!==null)if(fn(m.value,v)){if(m.children===h.children&&!At.current){i=$n(r,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var _=m.dependencies;if(_!==null){v=m.child;for(var A=_.firstContext;A!==null;){if(A.context===c){if(m.tag===1){A=zn(-1,a&-a),A.tag=2;var U=m.updateQueue;if(U!==null){U=U.shared;var H=U.pending;H===null?A.next=A:(A.next=H.next,H.next=A),U.pending=A}}m.lanes|=a,A=m.alternate,A!==null&&(A.lanes|=a),hc(m.return,a,i),_.lanes|=a;break}A=A.next}}else if(m.tag===10)v=m.type===i.type?null:m.child;else if(m.tag===18){if(v=m.return,v===null)throw Error(n(341));v.lanes|=a,_=v.alternate,_!==null&&(_.lanes|=a),hc(v,a,i),v=m.sibling}else v=m.child;if(v!==null)v.return=m;else for(v=m;v!==null;){if(v===i){v=null;break}if(m=v.sibling,m!==null){m.return=v.return,v=m;break}v=v.return}m=v}Pt(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,Ks(i,a),h=Jt(h),c=c(h),i.flags|=1,Pt(r,i,c,a),i.child;case 14:return c=i.type,h=pn(c,i.pendingProps),h=pn(c.type,h),Gm(r,i,c,h,a);case 15:return Xm(r,i,i.type,i.pendingProps,a);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:pn(c,h),Ya(r,i),i.tag=1,Ot(c)?(r=!0,Da(i)):r=!1,Ks(i,a),Vm(i,c,h),Rc(i,c,h,a),Dc(null,i,c,!0,r,a);case 19:return sg(r,i,a);case 22:return Ym(r,i,a)}throw Error(n(156,i.tag))};function kg(r,i){return ap(r,i)}function db(r,i,a,c){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(r,i,a,c){return new db(r,i,a,c)}function Zc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function fb(r){if(typeof r=="function")return Zc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Ce)return 11;if(r===_e)return 14}return 2}function wr(r,i){var a=r.alternate;return a===null?(a=tn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function ll(r,i,a,c,h,m){var v=2;if(c=r,typeof r=="function")Zc(r)&&(v=1);else if(typeof r=="string")v=5;else e:switch(r){case q:return ts(a.children,h,m,i);case B:v=8,h|=8;break;case Y:return r=tn(12,a,i,h|2),r.elementType=Y,r.lanes=m,r;case Se:return r=tn(13,a,i,h),r.elementType=Se,r.lanes=m,r;case Z:return r=tn(19,a,i,h),r.elementType=Z,r.lanes=m,r;case ce:return ul(a,h,m,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ne:v=10;break e;case ve:v=9;break e;case Ce:v=11;break e;case _e:v=14;break e;case Te:v=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=tn(v,a,i,h),i.elementType=r,i.type=c,i.lanes=m,i}function ts(r,i,a,c){return r=tn(7,r,c,i),r.lanes=a,r}function ul(r,i,a,c){return r=tn(22,r,c,i),r.elementType=ce,r.lanes=a,r.stateNode={isHidden:!1},r}function ed(r,i,a){return r=tn(6,r,null,i),r.lanes=a,r}function td(r,i,a){return i=tn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function hb(r,i,a,c,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ku(0),this.expirationTimes=ku(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function nd(r,i,a,c,h,m,v,_,A){return r=new hb(r,i,a,_,A),i===1?(i=1,m===!0&&(i|=8)):i=0,m=tn(3,null,null,i),r.current=m,m.stateNode=r,m.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},mc(m),r}function pb(r,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),ud.exports=kb(),ud.exports}var $g;function Rb(){if($g)return yl;$g=1;var t=U0();return yl.createRoot=t.createRoot,yl.hydrateRoot=t.hydrateRoot,yl}var Ab=Rb();const Ob=Ff(Ab),Nb=20,Db=1e6,Xn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let fd=0;function Lb(){return fd=(fd+1)%Number.MAX_VALUE,fd.toString()}const hd=new Map,Wg=t=>{if(hd.has(t))return;const e=setTimeout(()=>{hd.delete(t),Ao({type:Xn.REMOVE_TOAST,toastId:t})},Db);hd.set(t,e)},Mb=(t,e)=>{switch(e.type){case Xn.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,Nb)};case Xn.UPDATE_TOAST:return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case Xn.DISMISS_TOAST:{const{toastId:n}=e;return n?Wg(n):t.toasts.forEach(s=>{Wg(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case Xn.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Al=[];let Ol={toasts:[]};function Ao(t){Ol=Mb(Ol,t),Al.forEach(e=>{e(Ol)})}function Ib({...t}){const e=Lb(),n=o=>Ao({type:Xn.UPDATE_TOAST,toast:{...o,id:e}}),s=()=>Ao({type:Xn.DISMISS_TOAST,toastId:e});return Ao({type:Xn.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:o=>{o||s()}}}),{id:e,dismiss:s,update:n}}function Fb(){const[t,e]=T.useState(Ol);return T.useEffect(()=>(Al.push(e),()=>{const n=Al.indexOf(e);n>-1&&Al.splice(n,1)}),[t]),{...t,toast:Ib,dismiss:n=>Ao({type:Xn.DISMISS_TOAST,toastId:n})}}var Bf=U0();const jb=Ff(Bf);function Wt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}function Hg(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Uf(...t){return e=>{let n=!1;const s=t.map(o=>{const l=Hg(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o{var S;const{scope:w,children:b,...k}=y,E=((S=w==null?void 0:w[t])==null?void 0:S[f])||d,x=T.useMemo(()=>k,Object.values(k));return C.jsx(E.Provider,{value:x,children:b})};p.displayName=l+"Provider";function g(y,w){var E;const b=((E=w==null?void 0:w[t])==null?void 0:E[f])||d,k=T.useContext(b);if(k)return k;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[p,g]}const o=()=>{const l=n.map(u=>T.createContext(u));return function(d){const f=(d==null?void 0:d[t])||l;return T.useMemo(()=>({[`__scope${t}`]:{...d,[t]:f}}),[d,f])}};return o.scopeName=t,[s,Bb(o,...e)]}function Bb(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=s.reduce((d,{useScope:f,scopeName:p})=>{const y=f(l)[`__scope${p}`];return{...d,...y}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}function qg(t){const e=Ub(t),n=T.forwardRef((s,o)=>{const{children:l,...u}=s,d=T.Children.toArray(l),f=d.find(zb);if(f){const p=f.props.children,g=d.map(y=>y===f?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:y);return C.jsx(e,{...u,ref:o,children:T.isValidElement(p)?T.cloneElement(p,void 0,g):null})}return C.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function Ub(t){const e=T.forwardRef((n,s)=>{const{children:o,...l}=n;if(T.isValidElement(o)){const u=Wb(o),d=$b(l,o.props);return o.type!==T.Fragment&&(d.ref=s?Uf(s,u):u),T.cloneElement(o,d)}return T.Children.count(o)>1?T.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Vb=Symbol("radix.slottable");function zb(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Vb}function $b(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function Wb(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Hb(t){const e=t+"CollectionProvider",[n,s]=V0(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=E=>{const{scope:x,children:S}=E,R=br.useRef(null),P=br.useRef(new Map).current;return C.jsx(o,{scope:x,itemMap:P,collectionRef:R,children:S})};u.displayName=e;const d=t+"CollectionSlot",f=qg(d),p=br.forwardRef((E,x)=>{const{scope:S,children:R}=E,P=l(d,S),O=bs(x,P.collectionRef);return C.jsx(f,{ref:O,children:R})});p.displayName=d;const g=t+"CollectionItemSlot",y="data-radix-collection-item",w=qg(g),b=br.forwardRef((E,x)=>{const{scope:S,children:R,...P}=E,O=br.useRef(null),j=bs(x,O),V=l(g,S);return br.useEffect(()=>(V.itemMap.set(O,{ref:O,...P}),()=>void V.itemMap.delete(O))),C.jsx(w,{[y]:"",ref:j,children:R})});b.displayName=g;function k(E){const x=l(t+"CollectionConsumer",E);return br.useCallback(()=>{const R=x.collectionRef.current;if(!R)return[];const P=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(x.itemMap.values()).sort((V,q)=>P.indexOf(V.ref.current)-P.indexOf(q.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:u,Slot:p,ItemSlot:b},k,s]}function qb(t){const e=Kb(t),n=T.forwardRef((s,o)=>{const{children:l,...u}=s,d=T.Children.toArray(l),f=d.find(Gb);if(f){const p=f.props.children,g=d.map(y=>y===f?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:y);return C.jsx(e,{...u,ref:o,children:T.isValidElement(p)?T.cloneElement(p,void 0,g):null})}return C.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function Kb(t){const e=T.forwardRef((n,s)=>{const{children:o,...l}=n;if(T.isValidElement(o)){const u=Yb(o),d=Xb(l,o.props);return o.type!==T.Fragment&&(d.ref=s?Uf(s,u):u),T.cloneElement(o,d)}return T.Children.count(o)>1?T.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Qb=Symbol("radix.slottable");function Gb(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Qb}function Xb(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function Yb(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Jb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Mn=Jb.reduce((t,e)=>{const n=qb(`Primitive.${e}`),s=T.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function z0(t,e){t&&Bf.flushSync(()=>t.dispatchEvent(e))}function Ts(t){const e=T.useRef(t);return T.useEffect(()=>{e.current=t}),T.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function Zb(t,e=globalThis==null?void 0:globalThis.document){const n=Ts(t);T.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var eT="DismissableLayer",Ud="dismissableLayer.update",tT="dismissableLayer.pointerDownOutside",nT="dismissableLayer.focusOutside",Kg,$0=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W0=T.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=t,p=T.useContext($0),[g,y]=T.useState(null),w=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=T.useState({}),k=bs(e,q=>y(q)),E=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=E.indexOf(x),R=g?E.indexOf(g):-1,P=p.layersWithOutsidePointerEventsDisabled.size>0,O=R>=S,j=sT(q=>{const B=q.target,Y=[...p.branches].some(ne=>ne.contains(B));!O||Y||(o==null||o(q),u==null||u(q),q.defaultPrevented||d==null||d())},w),V=iT(q=>{const B=q.target;[...p.branches].some(ne=>ne.contains(B))||(l==null||l(q),u==null||u(q),q.defaultPrevented||d==null||d())},w);return Zb(q=>{R===p.layers.size-1&&(s==null||s(q),!q.defaultPrevented&&d&&(q.preventDefault(),d()))},w),T.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Kg=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Qg(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Kg)}},[g,w,n,p]),T.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Qg())},[g,p]),T.useEffect(()=>{const q=()=>b({});return document.addEventListener(Ud,q),()=>document.removeEventListener(Ud,q)},[]),C.jsx(Mn.div,{...f,ref:k,style:{pointerEvents:P?O?"auto":"none":void 0,...t.style},onFocusCapture:Wt(t.onFocusCapture,V.onFocusCapture),onBlurCapture:Wt(t.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Wt(t.onPointerDownCapture,j.onPointerDownCapture)})});W0.displayName=eT;var rT="DismissableLayerBranch",H0=T.forwardRef((t,e)=>{const n=T.useContext($0),s=T.useRef(null),o=bs(e,s);return T.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),C.jsx(Mn.div,{...t,ref:o})});H0.displayName=rT;function sT(t,e=globalThis==null?void 0:globalThis.document){const n=Ts(t),s=T.useRef(!1),o=T.useRef(()=>{});return T.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){q0(tT,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=f,e.addEventListener("click",o.current,{once:!0})):f()}else e.removeEventListener("click",o.current);s.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function iT(t,e=globalThis==null?void 0:globalThis.document){const n=Ts(t),s=T.useRef(!1);return T.useEffect(()=>{const o=l=>{l.target&&!s.current&&q0(nT,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Qg(){const t=new CustomEvent(Ud);document.dispatchEvent(t)}function q0(t,e,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?z0(o,l):o.dispatchEvent(l)}var oT=W0,aT=H0,Io=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},lT="Portal",K0=T.forwardRef((t,e)=>{var d;const{container:n,...s}=t,[o,l]=T.useState(!1);Io(()=>l(!0),[]);const u=n||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?jb.createPortal(C.jsx(Mn.div,{...s,ref:e}),u):null});K0.displayName=lT;function uT(t,e){return T.useReducer((n,s)=>e[n][s]??n,t)}var Q0=t=>{const{present:e,children:n}=t,s=cT(e),o=typeof n=="function"?n({present:s.isPresent}):T.Children.only(n),l=bs(s.ref,dT(o));return typeof n=="function"||s.isPresent?T.cloneElement(o,{ref:l}):null};Q0.displayName="Presence";function cT(t){const[e,n]=T.useState(),s=T.useRef(null),o=T.useRef(t),l=T.useRef("none"),u=t?"mounted":"unmounted",[d,f]=uT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const p=vl(s.current);l.current=d==="mounted"?p:"none"},[d]),Io(()=>{const p=s.current,g=o.current;if(g!==t){const w=l.current,b=vl(p);t?f("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(g&&w!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,f]),Io(()=>{if(e){let p;const g=e.ownerDocument.defaultView??window,y=b=>{const E=vl(s.current).includes(CSS.escape(b.animationName));if(b.target===e&&E&&(f("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",p=g.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},w=b=>{b.target===e&&(l.current=vl(s.current))};return e.addEventListener("animationstart",w),e.addEventListener("animationcancel",y),e.addEventListener("animationend",y),()=>{g.clearTimeout(p),e.removeEventListener("animationstart",w),e.removeEventListener("animationcancel",y),e.removeEventListener("animationend",y)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:T.useCallback(p=>{s.current=p?getComputedStyle(p):null,n(p)},[])}}function vl(t){return(t==null?void 0:t.animationName)||"none"}function dT(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var fT=B0[" useInsertionEffect ".trim().toString()]||Io;function hT({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[o,l,u]=pT({defaultProp:e,onChange:n}),d=t!==void 0,f=d?t:o;{const g=T.useRef(t!==void 0);T.useEffect(()=>{const y=g.current;y!==d&&console.warn(`${s} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const p=T.useCallback(g=>{var y;if(d){const w=mT(g)?g(t):g;w!==t&&((y=u.current)==null||y.call(u,w))}else l(g)},[d,t,l,u]);return[f,p]}function pT({defaultProp:t,onChange:e}){const[n,s]=T.useState(t),o=T.useRef(n),l=T.useRef(e);return fT(()=>{l.current=e},[e]),T.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,s,l]}function mT(t){return typeof t=="function"}var gT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),yT="VisuallyHidden",Vf=T.forwardRef((t,e)=>C.jsx(Mn.span,{...t,ref:e,style:{...gT,...t.style}}));Vf.displayName=yT;var zf="ToastProvider",[$f,vT,wT]=Hb("Toast"),[G0]=V0("Toast",[wT]),[xT,ru]=G0(zf),X0=t=>{const{__scopeToast:e,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:u}=t,[d,f]=T.useState(null),[p,g]=T.useState(0),y=T.useRef(!1),w=T.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${zf}\`. Expected non-empty \`string\`.`),C.jsx($f.Provider,{scope:e,children:C.jsx(xT,{scope:e,label:n,duration:s,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:T.useCallback(()=>g(b=>b+1),[]),onToastRemove:T.useCallback(()=>g(b=>b-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:w,children:u})})};X0.displayName=zf;var Y0="ToastViewport",ST=["F8"],Vd="toast.viewportPause",zd="toast.viewportResume",J0=T.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:s=ST,label:o="Notifications ({hotkey})",...l}=t,u=ru(Y0,n),d=vT(n),f=T.useRef(null),p=T.useRef(null),g=T.useRef(null),y=T.useRef(null),w=bs(e,y,u.onViewportChange),b=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=u.toastCount>0;T.useEffect(()=>{const x=S=>{var P;s.length!==0&&s.every(O=>S[O]||S.code===O)&&((P=y.current)==null||P.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[s]),T.useEffect(()=>{const x=f.current,S=y.current;if(k&&x&&S){const R=()=>{if(!u.isClosePausedRef.current){const V=new CustomEvent(Vd);S.dispatchEvent(V),u.isClosePausedRef.current=!0}},P=()=>{if(u.isClosePausedRef.current){const V=new CustomEvent(zd);S.dispatchEvent(V),u.isClosePausedRef.current=!1}},O=V=>{!x.contains(V.relatedTarget)&&P()},j=()=>{x.contains(document.activeElement)||P()};return x.addEventListener("focusin",R),x.addEventListener("focusout",O),x.addEventListener("pointermove",R),x.addEventListener("pointerleave",j),window.addEventListener("blur",R),window.addEventListener("focus",P),()=>{x.removeEventListener("focusin",R),x.removeEventListener("focusout",O),x.removeEventListener("pointermove",R),x.removeEventListener("pointerleave",j),window.removeEventListener("blur",R),window.removeEventListener("focus",P)}}},[k,u.isClosePausedRef]);const E=T.useCallback(({tabbingDirection:x})=>{const R=d().map(P=>{const O=P.ref.current,j=[O,...LT(O)];return x==="forwards"?j:j.reverse()});return(x==="forwards"?R.reverse():R).flat()},[d]);return T.useEffect(()=>{const x=y.current;if(x){const S=R=>{var j,V,q;const P=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!P){const B=document.activeElement,Y=R.shiftKey;if(R.target===x&&Y){(j=p.current)==null||j.focus();return}const Ce=E({tabbingDirection:Y?"backwards":"forwards"}),Se=Ce.findIndex(Z=>Z===B);pd(Ce.slice(Se+1))?R.preventDefault():Y?(V=p.current)==null||V.focus():(q=g.current)==null||q.focus()}};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)}},[d,E]),C.jsxs(aT,{ref:f,role:"region","aria-label":o.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:k?void 0:"none"},children:[k&&C.jsx($d,{ref:p,onFocusFromOutsideViewport:()=>{const x=E({tabbingDirection:"forwards"});pd(x)}}),C.jsx($f.Slot,{scope:n,children:C.jsx(Mn.ol,{tabIndex:-1,...l,ref:w})}),k&&C.jsx($d,{ref:g,onFocusFromOutsideViewport:()=>{const x=E({tabbingDirection:"backwards"});pd(x)}})]})});J0.displayName=Y0;var Z0="ToastFocusProxy",$d=T.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:s,...o}=t,l=ru(Z0,n);return C.jsx(Vf,{tabIndex:0,...o,ref:e,style:{position:"fixed"},onFocus:u=>{var p;const d=u.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&s()}})});$d.displayName=Z0;var Xo="Toast",ET="toast.swipeStart",bT="toast.swipeMove",TT="toast.swipeCancel",_T="toast.swipeEnd",ew=T.forwardRef((t,e)=>{const{forceMount:n,open:s,defaultOpen:o,onOpenChange:l,...u}=t,[d,f]=hT({prop:s,defaultProp:o??!0,onChange:l,caller:Xo});return C.jsx(Q0,{present:n||d,children:C.jsx(kT,{open:d,...u,ref:e,onClose:()=>f(!1),onPause:Ts(t.onPause),onResume:Ts(t.onResume),onSwipeStart:Wt(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Wt(t.onSwipeMove,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:Wt(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Wt(t.onSwipeEnd,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),f(!1)})})})});ew.displayName=Xo;var[CT,PT]=G0(Xo,{onClose(){}}),kT=T.forwardRef((t,e)=>{const{__scopeToast:n,type:s="foreground",duration:o,open:l,onClose:u,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:y,onSwipeCancel:w,onSwipeEnd:b,...k}=t,E=ru(Xo,n),[x,S]=T.useState(null),R=bs(e,Z=>S(Z)),P=T.useRef(null),O=T.useRef(null),j=o||E.duration,V=T.useRef(0),q=T.useRef(j),B=T.useRef(0),{onToastAdd:Y,onToastRemove:ne}=E,ve=Ts(()=>{var _e;(x==null?void 0:x.contains(document.activeElement))&&((_e=E.viewport)==null||_e.focus()),u()}),Ce=T.useCallback(Z=>{!Z||Z===1/0||(window.clearTimeout(B.current),V.current=new Date().getTime(),B.current=window.setTimeout(ve,Z))},[ve]);T.useEffect(()=>{const Z=E.viewport;if(Z){const _e=()=>{Ce(q.current),p==null||p()},Te=()=>{const ce=new Date().getTime()-V.current;q.current=q.current-ce,window.clearTimeout(B.current),f==null||f()};return Z.addEventListener(Vd,Te),Z.addEventListener(zd,_e),()=>{Z.removeEventListener(Vd,Te),Z.removeEventListener(zd,_e)}}},[E.viewport,j,f,p,Ce]),T.useEffect(()=>{l&&!E.isClosePausedRef.current&&Ce(j)},[l,j,E.isClosePausedRef,Ce]),T.useEffect(()=>(Y(),()=>ne()),[Y,ne]);const Se=T.useMemo(()=>x?aw(x):null,[x]);return E.viewport?C.jsxs(C.Fragment,{children:[Se&&C.jsx(RT,{__scopeToast:n,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:Se}),C.jsx(CT,{scope:n,onClose:ve,children:Bf.createPortal(C.jsx($f.ItemSlot,{scope:n,children:C.jsx(oT,{asChild:!0,onEscapeKeyDown:Wt(d,()=>{E.isFocusedToastEscapeKeyDownRef.current||ve(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:C.jsx(Mn.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":E.swipeDirection,...k,ref:R,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Wt(t.onKeyDown,Z=>{Z.key==="Escape"&&(d==null||d(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,ve()))}),onPointerDown:Wt(t.onPointerDown,Z=>{Z.button===0&&(P.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:Wt(t.onPointerMove,Z=>{if(!P.current)return;const _e=Z.clientX-P.current.x,Te=Z.clientY-P.current.y,ce=!!O.current,Q=["left","right"].includes(E.swipeDirection),se=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,z=Q?se(0,_e):0,L=Q?0:se(0,Te),$=Z.pointerType==="touch"?10:2,de={x:z,y:L},ge={originalEvent:Z,delta:de};ce?(O.current=de,wl(bT,y,ge,{discrete:!1})):Gg(de,E.swipeDirection,$)?(O.current=de,wl(ET,g,ge,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(_e)>$||Math.abs(Te)>$)&&(P.current=null)}),onPointerUp:Wt(t.onPointerUp,Z=>{const _e=O.current,Te=Z.target;if(Te.hasPointerCapture(Z.pointerId)&&Te.releasePointerCapture(Z.pointerId),O.current=null,P.current=null,_e){const ce=Z.currentTarget,Q={originalEvent:Z,delta:_e};Gg(_e,E.swipeDirection,E.swipeThreshold)?wl(_T,b,Q,{discrete:!0}):wl(TT,w,Q,{discrete:!0}),ce.addEventListener("click",se=>se.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),RT=t=>{const{__scopeToast:e,children:n,...s}=t,o=ru(Xo,e),[l,u]=T.useState(!1),[d,f]=T.useState(!1);return NT(()=>u(!0)),T.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:C.jsx(K0,{asChild:!0,children:C.jsx(Vf,{...s,children:l&&C.jsxs(C.Fragment,{children:[o.label," ",n]})})})},AT="ToastTitle",tw=T.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return C.jsx(Mn.div,{...s,ref:e})});tw.displayName=AT;var OT="ToastDescription",nw=T.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return C.jsx(Mn.div,{...s,ref:e})});nw.displayName=OT;var rw="ToastAction",sw=T.forwardRef((t,e)=>{const{altText:n,...s}=t;return n.trim()?C.jsx(ow,{altText:n,asChild:!0,children:C.jsx(Wf,{...s,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${rw}\`. Expected non-empty \`string\`.`),null)});sw.displayName=rw;var iw="ToastClose",Wf=T.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t,o=PT(iw,n);return C.jsx(ow,{asChild:!0,children:C.jsx(Mn.button,{type:"button",...s,ref:e,onClick:Wt(t.onClick,o.onClose)})})});Wf.displayName=iw;var ow=T.forwardRef((t,e)=>{const{__scopeToast:n,altText:s,...o}=t;return C.jsx(Mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:e})});function aw(t){const e=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&e.push(s.textContent),DT(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const u=s.dataset.radixToastAnnounceAlt;u&&e.push(u)}else e.push(...aw(s))}}),e}function wl(t,e,n,{discrete:s}){const o=n.originalEvent.currentTarget,l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?z0(o,l):o.dispatchEvent(l)}var Gg=(t,e,n=0)=>{const s=Math.abs(t.x),o=Math.abs(t.y),l=s>o;return e==="left"||e==="right"?l&&s>n:!l&&o>n};function NT(t=()=>{}){const e=Ts(t);Io(()=>{let n=0,s=0;return n=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(s)}},[e])}function DT(t){return t.nodeType===t.ELEMENT_NODE}function LT(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function pd(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var MT=X0,lw=J0,uw=ew,cw=tw,dw=nw,fw=sw,hw=Wf;function pw(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,Yg=mw,IT=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return Yg(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,u=Object.keys(o).map(p=>{const g=n==null?void 0:n[p],y=l==null?void 0:l[p];if(g===null)return null;const w=Xg(g)||Xg(y);return o[p][w]}),d=n&&Object.entries(n).reduce((p,g)=>{let[y,w]=g;return w===void 0||(p[y]=w),p},{}),f=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:y,className:w,...b}=g;return Object.entries(b).every(k=>{let[E,x]=k;return Array.isArray(x)?x.includes({...l,...d}[E]):{...l,...d}[E]===x})?[...p,y,w]:p},[]);return Yg(t,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gw=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var jT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const BT=T.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:u,...d},f)=>T.createElement("svg",{ref:f,...jT,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:gw("lucide",o),...d},[...u.map(([p,g])=>T.createElement(p,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const su=(t,e)=>{const n=T.forwardRef(({className:s,...o},l)=>T.createElement(BT,{ref:l,iconNode:e,className:gw(`lucide-${FT(t)}`,s),...o}));return n.displayName=`${t}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const UT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Yo=su("ArrowRight",UT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const VT=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],zT=su("Menu",VT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $T=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],WT=su("Search",$T);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yw=su("X",HT),qT=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s({classGroupId:t,validator:e}),vw=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),zl="-",Jg=[],QT="arbitrary..",GT=t=>{const e=YT(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return XT(u);const d=u.split(zl),f=d[0]===""&&d.length>1?1:0;return ww(d,f,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=s[u],p=n[u];return f?p?qT(p,f):f:p||Jg}return n[u]||Jg}}},ww=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const p=ww(t,e+1,l);if(p)return p}const u=n.validators;if(u===null)return;const d=e===0?t.join(zl):t.slice(e).join(zl),f=u.length;for(let p=0;pt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?QT+s:void 0})(),YT=t=>{const{theme:e,classGroups:n}=t;return JT(n,e)},JT=(t,e)=>{const n=vw();for(const s in t){const o=t[s];Hf(o,n,s,e)}return n},Hf=(t,e,n,s)=>{const o=t.length;for(let l=0;l{if(typeof t=="string"){e_(t,e,n);return}if(typeof t=="function"){t_(t,e,n,s);return}n_(t,e,n,s)},e_=(t,e,n)=>{const s=t===""?e:xw(e,t);s.classGroupId=n},t_=(t,e,n,s)=>{if(r_(t)){Hf(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(KT(n,t))},n_=(t,e,n,s)=>{const o=Object.entries(t),l=o.length;for(let u=0;u{let n=t;const s=e.split(zl),o=s.length;for(let l=0;l"isThemeGetter"in t&&t.isThemeGetter===!0,s_=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Wd="!",Zg=":",i_=[],ey=(t,e,n,s,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),o_=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=o=>{const l=[];let u=0,d=0,f=0,p;const g=o.length;for(let E=0;Ef?p-f:void 0;return ey(l,b,w,k)};if(e){const o=e+Zg,l=s;s=u=>u.startsWith(o)?l(u.slice(o.length)):ey(i_,!1,u,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},a_=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l0&&(o.sort(),s.push(...o),o=[]),s.push(u)):o.push(u)}return o.length>0&&(o.sort(),s.push(...o)),s}},l_=t=>({cache:s_(t.cacheSize),parseClassName:o_(t),sortModifiers:a_(t),...GT(t)}),u_=/\s+/,c_=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],d=t.trim().split(u_);let f="";for(let p=d.length-1;p>=0;p-=1){const g=d[p],{isExternal:y,modifiers:w,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:E}=n(g);if(y){f=g+(f.length>0?" "+f:f);continue}let x=!!E,S=s(x?k.substring(0,E):k);if(!S){if(!x){f=g+(f.length>0?" "+f:f);continue}if(S=s(k),!S){f=g+(f.length>0?" "+f:f);continue}x=!1}const R=w.length===0?"":w.length===1?w[0]:l(w).join(":"),P=b?R+Wd:R,O=P+S;if(u.indexOf(O)>-1)continue;u.push(O);const j=o(S,x);for(let V=0;V0?" "+f:f)}return f},d_=(...t)=>{let e=0,n,s,o="";for(;e{if(typeof t=="string")return t;let e,n="";for(let s=0;s{let n,s,o,l;const u=f=>{const p=e.reduce((g,y)=>y(g),t());return n=l_(p),s=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const p=s(f);if(p)return p;const g=c_(f,n);return o(f,g),g};return l=u,(...f)=>l(d_(...f))},h_=[],st=t=>{const e=n=>n[t]||h_;return e.isThemeGetter=!0,e},Ew=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,p_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,m_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,y_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,v_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=t=>p_.test(t),Pe=t=>!!t&&!Number.isNaN(Number(t)),Er=t=>!!t&&Number.isInteger(Number(t)),md=t=>t.endsWith("%")&&Pe(t.slice(0,-1)),Hn=t=>m_.test(t),Tw=()=>!0,x_=t=>g_.test(t)&&!y_.test(t),qf=()=>!1,S_=t=>v_.test(t),E_=t=>w_.test(t),b_=t=>!oe(t)&&!ae(t),T_=t=>Ur(t,Pw,qf),oe=t=>Ew.test(t),ns=t=>Ur(t,kw,x_),ty=t=>Ur(t,N_,Pe),__=t=>Ur(t,Aw,Tw),C_=t=>Ur(t,Rw,qf),ny=t=>Ur(t,_w,qf),P_=t=>Ur(t,Cw,E_),xl=t=>Ur(t,Ow,S_),ae=t=>bw.test(t),go=t=>ks(t,kw),k_=t=>ks(t,Rw),ry=t=>ks(t,_w),R_=t=>ks(t,Pw),A_=t=>ks(t,Cw),Sl=t=>ks(t,Ow,!0),O_=t=>ks(t,Aw,!0),Ur=(t,e,n)=>{const s=Ew.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},ks=(t,e,n=!1)=>{const s=bw.exec(t);return s?s[1]?e(s[1]):n:!1},_w=t=>t==="position"||t==="percentage",Cw=t=>t==="image"||t==="url",Pw=t=>t==="length"||t==="size"||t==="bg-size",kw=t=>t==="length",N_=t=>t==="number",Rw=t=>t==="family-name",Aw=t=>t==="number"||t==="weight",Ow=t=>t==="shadow",D_=()=>{const t=st("color"),e=st("font"),n=st("text"),s=st("font-weight"),o=st("tracking"),l=st("leading"),u=st("breakpoint"),d=st("container"),f=st("spacing"),p=st("radius"),g=st("shadow"),y=st("inset-shadow"),w=st("text-shadow"),b=st("drop-shadow"),k=st("blur"),E=st("perspective"),x=st("aspect"),S=st("ease"),R=st("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...O(),ae,oe],V=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],B=()=>[ae,oe,f],Y=()=>[Sr,"full","auto",...B()],ne=()=>[Er,"none","subgrid",ae,oe],ve=()=>["auto",{span:["full",Er,ae,oe]},Er,ae,oe],Ce=()=>[Er,"auto",ae,oe],Se=()=>["auto","min","max","fr",ae,oe],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_e=()=>["start","end","center","stretch","center-safe","end-safe"],Te=()=>["auto",...B()],ce=()=>[Sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],Q=()=>[Sr,"screen","full","dvw","lvw","svw","min","max","fit",...B()],se=()=>[Sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],z=()=>[t,ae,oe],L=()=>[...O(),ry,ny,{position:[ae,oe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",R_,T_,{size:[ae,oe]}],ge=()=>[md,go,ns],pe=()=>["","none","full",p,ae,oe],X=()=>["",Pe,go,ns],Ee=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Pe,md,ry,ny],it=()=>["","none",k,ae,oe],Kt=()=>["none",Pe,ae,oe],ct=()=>["none",Pe,ae,oe],ln=()=>[Pe,ae,oe],Qt=()=>[Sr,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hn],breakpoint:[Hn],color:[Tw],container:[Hn],"drop-shadow":[Hn],ease:["in","out","in-out"],font:[b_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hn],shadow:[Hn],spacing:["px",Pe],text:[Hn],"text-shadow":[Hn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sr,oe,ae,x]}],container:["container"],columns:[{columns:[Pe,oe,ae,d]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Er,"auto",ae,oe]}],basis:[{basis:[Sr,"full","auto",d,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Sr,"auto","initial","none",oe]}],grow:[{grow:["",Pe,ae,oe]}],shrink:[{shrink:["",Pe,ae,oe]}],order:[{order:[Er,"first","last","none",ae,oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:ve()}],"col-start":[{"col-start":Ce()}],"col-end":[{"col-end":Ce()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:ve()}],"row-start":[{"row-start":Ce()}],"row-end":[{"row-end":Ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Se()}],"auto-rows":[{"auto-rows":Se()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[..._e(),"normal"]}],"justify-self":[{"justify-self":["auto",..._e()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[..._e(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._e(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[..._e(),"baseline"]}],"place-self":[{"place-self":["auto",..._e()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Te()}],mx:[{mx:Te()}],my:[{my:Te()}],ms:[{ms:Te()}],me:[{me:Te()}],mbs:[{mbs:Te()}],mbe:[{mbe:Te()}],mt:[{mt:Te()}],mr:[{mr:Te()}],mb:[{mb:Te()}],ml:[{ml:Te()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[d,"screen",...ce()]}],"min-w":[{"min-w":[d,"screen","none",...ce()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...ce()]}],h:[{h:["screen","lh",...ce()]}],"min-h":[{"min-h":["screen","lh","none",...ce()]}],"max-h":[{"max-h":["screen","lh",...ce()]}],"font-size":[{text:["base",n,go,ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,O_,__]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",md,oe]}],"font-family":[{font:[k_,C_,e]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ae,oe]}],"line-clamp":[{"line-clamp":[Pe,"none",ae,ty]}],leading:[{leading:[l,...B()]}],"list-image":[{"list-image":["none",ae,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ae,ns]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Pe,"auto",ae,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Er,ae,oe],radial:["",ae,oe],conic:[Er,ae,oe]},A_,P_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ae,oe]}],"outline-w":[{outline:["",Pe,go,ns]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",g,Sl,xl]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,Sl,xl]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Pe,ns]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",w,Sl,xl]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Pe,ae,oe]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ae,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,oe]}],filter:[{filter:["","none",ae,oe]}],blur:[{blur:it()}],brightness:[{brightness:[Pe,ae,oe]}],contrast:[{contrast:[Pe,ae,oe]}],"drop-shadow":[{"drop-shadow":["","none",b,Sl,xl]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Pe,ae,oe]}],"hue-rotate":[{"hue-rotate":[Pe,ae,oe]}],invert:[{invert:["",Pe,ae,oe]}],saturate:[{saturate:[Pe,ae,oe]}],sepia:[{sepia:["",Pe,ae,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,oe]}],"backdrop-blur":[{"backdrop-blur":it()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ae,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ae,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ae,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ae,oe]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ae,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ae,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ae,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ae,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ae,oe]}],ease:[{ease:["linear","initial",S,ae,oe]}],delay:[{delay:[Pe,ae,oe]}],animate:[{animate:["none",R,ae,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ae,oe]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:Kt()}],"rotate-x":[{"rotate-x":Kt()}],"rotate-y":[{"rotate-y":Kt()}],"rotate-z":[{"rotate-z":Kt()}],scale:[{scale:ct()}],"scale-x":[{"scale-x":ct()}],"scale-y":[{"scale-y":ct()}],"scale-z":[{"scale-z":ct()}],"scale-3d":["scale-3d"],skew:[{skew:ln()}],"skew-x":[{"skew-x":ln()}],"skew-y":[{"skew-y":ln()}],transform:[{transform:[ae,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Qt()}],"translate-x":[{"translate-x":Qt()}],"translate-y":[{"translate-y":Qt()}],"translate-z":[{"translate-z":Qt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,oe]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Pe,go,ns,ty]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},L_=f_(D_);function Vr(...t){return L_(mw(t))}const M_=MT,Nw=T.forwardRef(({className:t,...e},n)=>C.jsx(lw,{ref:n,className:Vr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Nw.displayName=lw.displayName;const I_=IT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Dw=T.forwardRef(({className:t,variant:e,...n},s)=>C.jsx(uw,{ref:s,className:Vr(I_({variant:e}),t),...n}));Dw.displayName=uw.displayName;const F_=T.forwardRef(({className:t,...e},n)=>C.jsx(fw,{ref:n,className:Vr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));F_.displayName=fw.displayName;const Lw=T.forwardRef(({className:t,...e},n)=>C.jsx(hw,{ref:n,className:Vr("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:C.jsx(yw,{className:"h-4 w-4"})}));Lw.displayName=hw.displayName;const Mw=T.forwardRef(({className:t,...e},n)=>C.jsx(cw,{ref:n,className:Vr("text-sm font-semibold",t),...e}));Mw.displayName=cw.displayName;const Iw=T.forwardRef(({className:t,...e},n)=>C.jsx(dw,{ref:n,className:Vr("text-sm opacity-90",t),...e}));Iw.displayName=dw.displayName;function j_(){const{toasts:t}=Fb();return C.jsxs(M_,{children:[t.map(function({id:e,title:n,description:s,action:o,...l}){return C.jsxs(Dw,{...l,children:[C.jsxs("div",{className:"grid gap-1",children:[n&&C.jsx(Mw,{children:n}),s&&C.jsx(Iw,{children:s})]}),o,C.jsx(Lw,{})]},e)}),C.jsx(Nw,{})]})}var Jo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},B_={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Cr,If,k0,U_=(k0=class{constructor(){me(this,Cr,B_);me(this,If,!1)}setTimeoutProvider(t){te(this,Cr,t)}setTimeout(t,e){return N(this,Cr).setTimeout(t,e)}clearTimeout(t){N(this,Cr).clearTimeout(t)}setInterval(t,e){return N(this,Cr).setInterval(t,e)}clearInterval(t){N(this,Cr).clearInterval(t)}},Cr=new WeakMap,If=new WeakMap,k0),ls=new U_;function V_(t){setTimeout(t,0)}var _s=typeof window>"u"||"Deno"in globalThis;function Ft(){}function z_(t,e){return typeof t=="function"?t(e):t}function Hd(t){return typeof t=="number"&&t>=0&&t!==1/0}function Fw(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Mr(t,e){return typeof t=="function"?t(e):t}function on(t,e){return typeof t=="function"?t(e):t}function sy(t,e){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:u,stale:d}=t;if(u){if(s){if(e.queryHash!==Kf(u,e.options))return!1}else if(!jo(e.queryKey,u))return!1}if(n!=="all"){const f=e.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||o&&o!==e.state.fetchStatus||l&&!l(e))}function iy(t,e){const{exact:n,status:s,predicate:o,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(n){if(Fo(e.options.mutationKey)!==Fo(l))return!1}else if(!jo(e.options.mutationKey,l))return!1}return!(s&&e.state.status!==s||o&&!o(e))}function Kf(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fo)(t)}function Fo(t){return JSON.stringify(t,(e,n)=>Kd(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function jo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>jo(t[n],e[n])):!1}var $_=Object.prototype.hasOwnProperty;function jw(t,e,n=0){if(t===e)return t;if(n>500)return e;const s=oy(t)&&oy(e);if(!s&&!(Kd(t)&&Kd(e)))return e;const l=(s?t:Object.keys(t)).length,u=s?e:Object.keys(e),d=u.length,f=s?new Array(d):{};let p=0;for(let g=0;g{ls.setTimeout(e,t)})}function Qd(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?jw(t,e):e}function H_(t,e,n=0){const s=[...t,e];return n&&s.length>n?s.slice(1):s}function q_(t,e,n=0){const s=[e,...t];return n&&s.length>n?s.slice(0,-1):s}var Qf=Symbol();function Bw(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Qf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Uw(t,e){return typeof t=="function"?t(...e):!!t}function K_(t,e,n){let s=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??(o=e()),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var ds,Pr,li,R0,Q_=(R0=class extends Jo{constructor(){super();me(this,ds);me(this,Pr);me(this,li);te(this,li,e=>{if(!_s&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,Pr)||this.setEventListener(N(this,li))}onUnsubscribe(){var e;this.hasListeners()||((e=N(this,Pr))==null||e.call(this),te(this,Pr,void 0))}setEventListener(e){var n;te(this,li,e),(n=N(this,Pr))==null||n.call(this),te(this,Pr,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){N(this,ds)!==e&&(te(this,ds,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof N(this,ds)=="boolean"?N(this,ds):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ds=new WeakMap,Pr=new WeakMap,li=new WeakMap,R0),Gf=new Q_;function Gd(){let t,e;const n=new Promise((o,l)=>{t=o,e=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},n.reject=o=>{s({status:"rejected",reason:o}),e(o)},n}var G_=V_;function X_(){let t=[],e=0,n=d=>{d()},s=d=>{d()},o=G_;const l=d=>{e?t.push(d):o(()=>{n(d)})},u=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;e++;try{f=d()}finally{e--,e||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var gt=X_(),ui,kr,ci,A0,Y_=(A0=class extends Jo{constructor(){super();me(this,ui,!0);me(this,kr);me(this,ci);te(this,ci,e=>{if(!_s&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){N(this,kr)||this.setEventListener(N(this,ci))}onUnsubscribe(){var e;this.hasListeners()||((e=N(this,kr))==null||e.call(this),te(this,kr,void 0))}setEventListener(e){var n;te(this,ci,e),(n=N(this,kr))==null||n.call(this),te(this,kr,e(this.setOnline.bind(this)))}setOnline(e){N(this,ui)!==e&&(te(this,ui,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return N(this,ui)}},ui=new WeakMap,kr=new WeakMap,ci=new WeakMap,A0),$l=new Y_;function J_(t){return Math.min(1e3*2**t,3e4)}function Vw(t){return(t??"online")==="online"?$l.isOnline():!0}var Xd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function zw(t){let e=!1,n=0,s;const o=Gd(),l=()=>o.status!=="pending",u=E=>{var x;if(!l()){const S=new Xd(E);w(S),(x=t.onCancel)==null||x.call(t,S)}},d=()=>{e=!0},f=()=>{e=!1},p=()=>Gf.isFocused()&&(t.networkMode==="always"||$l.isOnline())&&t.canRun(),g=()=>Vw(t.networkMode)&&t.canRun(),y=E=>{l()||(s==null||s(),o.resolve(E))},w=E=>{l()||(s==null||s(),o.reject(E))},b=()=>new Promise(E=>{var x;s=S=>{(l()||p())&&E(S)},(x=t.onPause)==null||x.call(t)}).then(()=>{var E;s=void 0,l()||(E=t.onContinue)==null||E.call(t)}),k=()=>{if(l())return;let E;const x=n===0?t.initialPromise:void 0;try{E=x??t.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(y).catch(S=>{var V;if(l())return;const R=t.retry??(_s?0:3),P=t.retryDelay??J_,O=typeof P=="function"?P(n,S):P,j=R===!0||typeof R=="number"&&np()?void 0:b()).then(()=>{e?w(S):k()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(s==null||s(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?k():b().then(k),o)}}var fs,O0,$w=(O0=class{constructor(){me(this,fs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hd(this.gcTime)&&te(this,fs,ls.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_s?1/0:300*1e3))}clearGcTimeout(){N(this,fs)&&(ls.clearTimeout(N(this,fs)),te(this,fs,void 0))}},fs=new WeakMap,O0),hs,di,sn,ps,ut,Ho,ms,wn,qn,N0,Z_=(N0=class extends $w{constructor(e){super();me(this,wn);me(this,hs);me(this,di);me(this,sn);me(this,ps);me(this,ut);me(this,Ho);me(this,ms);te(this,ms,!1),te(this,Ho,e.defaultOptions),this.setOptions(e.options),this.observers=[],te(this,ps,e.client),te(this,sn,N(this,ps).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,te(this,hs,uy(this.options)),this.state=e.state??N(this,hs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=N(this,ut))==null?void 0:e.promise}setOptions(e){if(this.options={...N(this,Ho),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=uy(this.options);n.data!==void 0&&(this.setState(ly(n.data,n.dataUpdatedAt)),te(this,hs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,sn).remove(this)}setData(e,n){const s=Qd(this.state.data,e,this.options);return Ae(this,wn,qn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(e,n){Ae(this,wn,qn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var s,o;const n=(s=N(this,ut))==null?void 0:s.promise;return(o=N(this,ut))==null||o.cancel(e),n?n.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,hs))}isActive(){return this.observers.some(e=>on(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Mr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Fw(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=N(this,ut))==null||n.continue()}onOnline(){var n;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=N(this,ut))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),N(this,sn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(N(this,ut)&&(N(this,ms)?N(this,ut).cancel({revert:!0}):N(this,ut).cancelRetry()),this.scheduleGc()),N(this,sn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,wn,qn).call(this,{type:"invalidate"})}async fetch(e,n){var f,p,g,y,w,b,k,E,x,S,R,P;if(this.state.fetchStatus!=="idle"&&((f=N(this,ut))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,ut))return N(this,ut).continueRetry(),N(this,ut).promise}if(e&&this.setOptions(e),!this.options.queryFn){const O=this.observers.find(j=>j.options.queryFn);O&&this.setOptions(O.options)}const s=new AbortController,o=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(te(this,ms,!0),s.signal)})},l=()=>{const O=Bw(this.options,n),V=(()=>{const q={client:N(this,ps),queryKey:this.queryKey,meta:this.meta};return o(q),q})();return te(this,ms,!1),this.options.persister?this.options.persister(O,V,this):O(V)},d=(()=>{const O={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,ps),state:this.state,fetchFn:l};return o(O),O})();(p=this.options.behavior)==null||p.onFetch(d,this),te(this,di,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ae(this,wn,qn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),te(this,ut,zw({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:O=>{O instanceof Xd&&O.revert&&this.setState({...N(this,di),fetchStatus:"idle"}),s.abort()},onFail:(O,j)=>{Ae(this,wn,qn).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{Ae(this,wn,qn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,wn,qn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const O=await N(this,ut).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(b=(w=N(this,sn).config).onSuccess)==null||b.call(w,O,this),(E=(k=N(this,sn).config).onSettled)==null||E.call(k,O,this.state.error,this),O}catch(O){if(O instanceof Xd){if(O.silent)return N(this,ut).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw Ae(this,wn,qn).call(this,{type:"error",error:O}),(S=(x=N(this,sn).config).onError)==null||S.call(x,O,this),(P=(R=N(this,sn).config).onSettled)==null||P.call(R,this.state.data,O,this),O}finally{this.scheduleGc()}}},hs=new WeakMap,di=new WeakMap,sn=new WeakMap,ps=new WeakMap,ut=new WeakMap,Ho=new WeakMap,ms=new WeakMap,wn=new WeakSet,qn=function(e){const n=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ww(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,...ly(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,di,e.manual?o:void 0),o;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),gt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),N(this,sn).notify({query:this,type:"updated",action:e})})},N0);function Ww(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Vw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ly(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uy(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,s=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var It,Oe,qo,Rt,gs,fi,Qn,Rr,Ko,hi,pi,ys,vs,Ar,mi,Ie,So,Yd,Jd,Zd,ef,tf,nf,rf,Hw,D0,eC=(D0=class extends Jo{constructor(e,n){super();me(this,Ie);me(this,It);me(this,Oe);me(this,qo);me(this,Rt);me(this,gs);me(this,fi);me(this,Qn);me(this,Rr);me(this,Ko);me(this,hi);me(this,pi);me(this,ys);me(this,vs);me(this,Ar);me(this,mi,new Set);this.options=n,te(this,It,e),te(this,Rr,null),te(this,Qn,Gd()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Oe).addObserver(this),cy(N(this,Oe),this.options)?Ae(this,Ie,So).call(this):this.updateResult(),Ae(this,Ie,ef).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sf(N(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sf(N(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ie,tf).call(this),Ae(this,Ie,nf).call(this),N(this,Oe).removeObserver(this)}setOptions(e){const n=this.options,s=N(this,Oe);if(this.options=N(this,It).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof on(this.options.enabled,N(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ie,rf).call(this),N(this,Oe).setOptions(this.options),n._defaulted&&!qd(this.options,n)&&N(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Oe),observer:this});const o=this.hasListeners();o&&dy(N(this,Oe),s,this.options,n)&&Ae(this,Ie,So).call(this),this.updateResult(),o&&(N(this,Oe)!==s||on(this.options.enabled,N(this,Oe))!==on(n.enabled,N(this,Oe))||Mr(this.options.staleTime,N(this,Oe))!==Mr(n.staleTime,N(this,Oe)))&&Ae(this,Ie,Yd).call(this);const l=Ae(this,Ie,Jd).call(this);o&&(N(this,Oe)!==s||on(this.options.enabled,N(this,Oe))!==on(n.enabled,N(this,Oe))||l!==N(this,Ar))&&Ae(this,Ie,Zd).call(this,l)}getOptimisticResult(e){const n=N(this,It).getQueryCache().build(N(this,It),e),s=this.createResult(n,e);return nC(this,s)&&(te(this,Rt,s),te(this,fi,this.options),te(this,gs,N(this,Oe).state)),s}getCurrentResult(){return N(this,Rt)}trackResult(e,n){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Qn).status==="pending"&&N(this,Qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){N(this,mi).add(e)}getCurrentQuery(){return N(this,Oe)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=N(this,It).defaultQueryOptions(e),s=N(this,It).getQueryCache().build(N(this,It),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(e){return Ae(this,Ie,So).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Rt)))}createResult(e,n){var Y;const s=N(this,Oe),o=this.options,l=N(this,Rt),u=N(this,gs),d=N(this,fi),p=e!==s?e.state:N(this,qo),{state:g}=e;let y={...g},w=!1,b;if(n._optimisticResults){const ne=this.hasListeners(),ve=!ne&&cy(e,n),Ce=ne&&dy(e,s,n,o);(ve||Ce)&&(y={...y,...Ww(g.data,e.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:k,errorUpdatedAt:E,status:x}=y;b=y.data;let S=!1;if(n.placeholderData!==void 0&&b===void 0&&x==="pending"){let ne;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(ne=l.data,S=!0):ne=typeof n.placeholderData=="function"?n.placeholderData((Y=N(this,pi))==null?void 0:Y.state.data,N(this,pi)):n.placeholderData,ne!==void 0&&(x="success",b=Qd(l==null?void 0:l.data,ne,n),w=!0)}if(n.select&&b!==void 0&&!S)if(l&&b===(u==null?void 0:u.data)&&n.select===N(this,Ko))b=N(this,hi);else try{te(this,Ko,n.select),b=n.select(b),b=Qd(l==null?void 0:l.data,b,n),te(this,hi,b),te(this,Rr,null)}catch(ne){te(this,Rr,ne)}N(this,Rr)&&(k=N(this,Rr),b=N(this,hi),E=Date.now(),x="error");const R=y.fetchStatus==="fetching",P=x==="pending",O=x==="error",j=P&&R,V=b!==void 0,B={status:x,fetchStatus:y.fetchStatus,isPending:P,isSuccess:x==="success",isError:O,isInitialLoading:j,isLoading:j,data:b,dataUpdatedAt:y.dataUpdatedAt,error:k,errorUpdatedAt:E,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!P,isLoadingError:O&&!V,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:O&&V,isStale:Xf(e,n),refetch:this.refetch,promise:N(this,Qn),isEnabled:on(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ne=B.data!==void 0,ve=B.status==="error"&&!ne,Ce=_e=>{ve?_e.reject(B.error):ne&&_e.resolve(B.data)},Se=()=>{const _e=te(this,Qn,B.promise=Gd());Ce(_e)},Z=N(this,Qn);switch(Z.status){case"pending":e.queryHash===s.queryHash&&Ce(Z);break;case"fulfilled":(ve||B.data!==Z.value)&&Se();break;case"rejected":(!ve||B.error!==Z.reason)&&Se();break}}return B}updateResult(){const e=N(this,Rt),n=this.createResult(N(this,Oe),this.options);if(te(this,gs,N(this,Oe).state),te(this,fi,this.options),N(this,gs).data!==void 0&&te(this,pi,N(this,Oe)),qd(n,e))return;te(this,Rt,n);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!N(this,mi).size)return!0;const u=new Set(l??N(this,mi));return this.options.throwOnError&&u.add("error"),Object.keys(N(this,Rt)).some(d=>{const f=d;return N(this,Rt)[f]!==e[f]&&u.has(f)})};Ae(this,Ie,Hw).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ie,ef).call(this)}},It=new WeakMap,Oe=new WeakMap,qo=new WeakMap,Rt=new WeakMap,gs=new WeakMap,fi=new WeakMap,Qn=new WeakMap,Rr=new WeakMap,Ko=new WeakMap,hi=new WeakMap,pi=new WeakMap,ys=new WeakMap,vs=new WeakMap,Ar=new WeakMap,mi=new WeakMap,Ie=new WeakSet,So=function(e){Ae(this,Ie,rf).call(this);let n=N(this,Oe).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ft)),n},Yd=function(){Ae(this,Ie,tf).call(this);const e=Mr(this.options.staleTime,N(this,Oe));if(_s||N(this,Rt).isStale||!Hd(e))return;const s=Fw(N(this,Rt).dataUpdatedAt,e)+1;te(this,ys,ls.setTimeout(()=>{N(this,Rt).isStale||this.updateResult()},s))},Jd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Oe)):this.options.refetchInterval)??!1},Zd=function(e){Ae(this,Ie,nf).call(this),te(this,Ar,e),!(_s||on(this.options.enabled,N(this,Oe))===!1||!Hd(N(this,Ar))||N(this,Ar)===0)&&te(this,vs,ls.setInterval(()=>{(this.options.refetchIntervalInBackground||Gf.isFocused())&&Ae(this,Ie,So).call(this)},N(this,Ar)))},ef=function(){Ae(this,Ie,Yd).call(this),Ae(this,Ie,Zd).call(this,Ae(this,Ie,Jd).call(this))},tf=function(){N(this,ys)&&(ls.clearTimeout(N(this,ys)),te(this,ys,void 0))},nf=function(){N(this,vs)&&(ls.clearInterval(N(this,vs)),te(this,vs,void 0))},rf=function(){const e=N(this,It).getQueryCache().build(N(this,It),this.options);if(e===N(this,Oe))return;const n=N(this,Oe);te(this,Oe,e),te(this,qo,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Hw=function(e){gt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(N(this,Rt))}),N(this,It).getQueryCache().notify({query:N(this,Oe),type:"observerResultsUpdated"})})},D0);function tC(t,e){return on(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function cy(t,e){return tC(t,e)||t.state.data!==void 0&&sf(t,e,e.refetchOnMount)}function sf(t,e,n){if(on(e.enabled,t)!==!1&&Mr(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&Xf(t,e)}return!1}function dy(t,e,n,s){return(t!==e||on(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Xf(t,n)}function Xf(t,e){return on(e.enabled,t)!==!1&&t.isStaleByTime(Mr(e.staleTime,t))}function nC(t,e){return!qd(t.getCurrentResult(),e)}function fy(t){return{onFetch:(e,n)=>{var g,y,w,b,k;const s=e.options,o=(w=(y=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:w.direction,l=((b=e.state.data)==null?void 0:b.pages)||[],u=((k=e.state.data)==null?void 0:k.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let E=!1;const x=P=>{K_(P,()=>e.signal,()=>E=!0)},S=Bw(e.options,e.fetchOptions),R=async(P,O,j)=>{if(E)return Promise.reject();if(O==null&&P.pages.length)return Promise.resolve(P);const q=(()=>{const ve={client:e.client,queryKey:e.queryKey,pageParam:O,direction:j?"backward":"forward",meta:e.options.meta};return x(ve),ve})(),B=await S(q),{maxPages:Y}=e.options,ne=j?q_:H_;return{pages:ne(P.pages,B,Y),pageParams:ne(P.pageParams,O,Y)}};if(o&&l.length){const P=o==="backward",O=P?rC:hy,j={pages:l,pageParams:u},V=O(s,j);d=await R(j,V,P)}else{const P=t??l.length;do{const O=f===0?u[0]??s.initialPageParam:hy(s,d);if(f>0&&O==null)break;d=await R(d,O),f++}while(f{var E,x;return(x=(E=e.options).persister)==null?void 0:x.call(E,p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=p}}}function hy(t,{pages:e,pageParams:n}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,n[s],n):void 0}function rC(t,{pages:e,pageParams:n}){var s;return e.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,e[0],e,n[0],n):void 0}var Qo,kn,bt,ws,Rn,Tr,L0,sC=(L0=class extends $w{constructor(e){super();me(this,Rn);me(this,Qo);me(this,kn);me(this,bt);me(this,ws);te(this,Qo,e.client),this.mutationId=e.mutationId,te(this,bt,e.mutationCache),te(this,kn,[]),this.state=e.state||iC(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){N(this,kn).includes(e)||(N(this,kn).push(e),this.clearGcTimeout(),N(this,bt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){te(this,kn,N(this,kn).filter(n=>n!==e)),this.scheduleGc(),N(this,bt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){N(this,kn).length||(this.state.status==="pending"?this.scheduleGc():N(this,bt).remove(this))}continue(){var e;return((e=N(this,ws))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,g,y,w,b,k,E,x,S,R,P,O,j,V,q;const n=()=>{Ae(this,Rn,Tr).call(this,{type:"continue"})},s={client:N(this,Qo),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,ws,zw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(B,Y)=>{Ae(this,Rn,Tr).call(this,{type:"failed",failureCount:B,error:Y})},onPause:()=>{Ae(this,Rn,Tr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,bt).canRun(this)}));const o=this.state.status==="pending",l=!N(this,ws).canStart();try{if(o)n();else{Ae(this,Rn,Tr).call(this,{type:"pending",variables:e,isPaused:l}),N(this,bt).config.onMutate&&await N(this,bt).config.onMutate(e,this,s);const Y=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,e,s));Y!==this.state.context&&Ae(this,Rn,Tr).call(this,{type:"pending",context:Y,variables:e,isPaused:l})}const B=await N(this,ws).start();return await((p=(f=N(this,bt).config).onSuccess)==null?void 0:p.call(f,B,e,this.state.context,this,s)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,B,e,this.state.context,s)),await((b=(w=N(this,bt).config).onSettled)==null?void 0:b.call(w,B,null,this.state.variables,this.state.context,this,s)),await((E=(k=this.options).onSettled)==null?void 0:E.call(k,B,null,e,this.state.context,s)),Ae(this,Rn,Tr).call(this,{type:"success",data:B}),B}catch(B){try{await((S=(x=N(this,bt).config).onError)==null?void 0:S.call(x,B,e,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((P=(R=this.options).onError)==null?void 0:P.call(R,B,e,this.state.context,s))}catch(Y){Promise.reject(Y)}try{await((j=(O=N(this,bt).config).onSettled)==null?void 0:j.call(O,void 0,B,this.state.variables,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((q=(V=this.options).onSettled)==null?void 0:q.call(V,void 0,B,e,this.state.context,s))}catch(Y){Promise.reject(Y)}throw Ae(this,Rn,Tr).call(this,{type:"error",error:B}),B}finally{N(this,bt).runNext(this)}}},Qo=new WeakMap,kn=new WeakMap,bt=new WeakMap,ws=new WeakMap,Rn=new WeakSet,Tr=function(e){const n=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),gt.batch(()=>{N(this,kn).forEach(s=>{s.onMutationUpdate(e)}),N(this,bt).notify({mutation:this,type:"updated",action:e})})},L0);function iC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gn,xn,Go,M0,oC=(M0=class extends Jo{constructor(e={}){super();me(this,Gn);me(this,xn);me(this,Go);this.config=e,te(this,Gn,new Set),te(this,xn,new Map),te(this,Go,0)}build(e,n,s){const o=new sC({client:e,mutationCache:this,mutationId:++gl(this,Go)._,options:e.defaultMutationOptions(n),state:s});return this.add(o),o}add(e){N(this,Gn).add(e);const n=El(e);if(typeof n=="string"){const s=N(this,xn).get(n);s?s.push(e):N(this,xn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(N(this,Gn).delete(e)){const n=El(e);if(typeof n=="string"){const s=N(this,xn).get(n);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&N(this,xn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=El(e);if(typeof n=="string"){const s=N(this,xn).get(n),o=s==null?void 0:s.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){var s;const n=El(e);if(typeof n=="string"){const o=(s=N(this,xn).get(n))==null?void 0:s.find(l=>l!==e&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{N(this,Gn).forEach(e=>{this.notify({type:"removed",mutation:e})}),N(this,Gn).clear(),N(this,xn).clear()})}getAll(){return Array.from(N(this,Gn))}find(e){const n={exact:!0,...e};return this.getAll().find(s=>iy(n,s))}findAll(e={}){return this.getAll().filter(n=>iy(e,n))}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return gt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ft))))}},Gn=new WeakMap,xn=new WeakMap,Go=new WeakMap,M0);function El(t){var e;return(e=t.options.scope)==null?void 0:e.id}var An,I0,aC=(I0=class extends Jo{constructor(e={}){super();me(this,An);this.config=e,te(this,An,new Map)}build(e,n,s){const o=n.queryKey,l=n.queryHash??Kf(o,n);let u=this.get(l);return u||(u=new Z_({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(n),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){N(this,An).has(e.queryHash)||(N(this,An).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=N(this,An).get(e.queryHash);n&&(e.destroy(),n===e&&N(this,An).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){gt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return N(this,An).get(e)}getAll(){return[...N(this,An).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(s=>sy(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>sy(e,s)):n}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},An=new WeakMap,I0),Qe,Or,Nr,gi,yi,Dr,vi,wi,F0,lC=(F0=class{constructor(t={}){me(this,Qe);me(this,Or);me(this,Nr);me(this,gi);me(this,yi);me(this,Dr);me(this,vi);me(this,wi);te(this,Qe,t.queryCache||new aC),te(this,Or,t.mutationCache||new oC),te(this,Nr,t.defaultOptions||{}),te(this,gi,new Map),te(this,yi,new Map),te(this,Dr,0)}mount(){gl(this,Dr)._++,N(this,Dr)===1&&(te(this,vi,Gf.subscribe(async t=>{t&&(await this.resumePausedMutations(),N(this,Qe).onFocus())})),te(this,wi,$l.subscribe(async t=>{t&&(await this.resumePausedMutations(),N(this,Qe).onOnline())})))}unmount(){var t,e;gl(this,Dr)._--,N(this,Dr)===0&&((t=N(this,vi))==null||t.call(this),te(this,vi,void 0),(e=N(this,wi))==null||e.call(this),te(this,wi,void 0))}isFetching(t){return N(this,Qe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return N(this,Or).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=N(this,Qe).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=N(this,Qe).build(this,e),s=n.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Mr(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return N(this,Qe).findAll(t).map(({queryKey:e,state:n})=>{const s=n.data;return[e,s]})}setQueryData(t,e,n){const s=this.defaultQueryOptions({queryKey:t}),o=N(this,Qe).get(s.queryHash),l=o==null?void 0:o.state.data,u=z_(e,l);if(u!==void 0)return N(this,Qe).build(this,s).setData(u,{...n,manual:!0})}setQueriesData(t,e,n){return gt.batch(()=>N(this,Qe).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=N(this,Qe).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=N(this,Qe);gt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=N(this,Qe);return gt.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},s=gt.batch(()=>N(this,Qe).findAll(t).map(o=>o.cancel(n)));return Promise.all(s).then(Ft).catch(Ft)}invalidateQueries(t,e={}){return gt.batch(()=>(N(this,Qe).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},s=gt.batch(()=>N(this,Qe).findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Ft)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Ft)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=N(this,Qe).build(this,e);return n.isStaleByTime(Mr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ft).catch(Ft)}fetchInfiniteQuery(t){return t.behavior=fy(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ft).catch(Ft)}ensureInfiniteQueryData(t){return t.behavior=fy(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return $l.isOnline()?N(this,Or).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Qe)}getMutationCache(){return N(this,Or)}getDefaultOptions(){return N(this,Nr)}setDefaultOptions(t){te(this,Nr,t)}setQueryDefaults(t,e){N(this,gi).set(Fo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...N(this,gi).values()],n={};return e.forEach(s=>{jo(t,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(t,e){N(this,yi).set(Fo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...N(this,yi).values()],n={};return e.forEach(s=>{jo(t,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...N(this,Nr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Kf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Qf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...N(this,Nr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){N(this,Qe).clear(),N(this,Or).clear()}},Qe=new WeakMap,Or=new WeakMap,Nr=new WeakMap,gi=new WeakMap,yi=new WeakMap,Dr=new WeakMap,vi=new WeakMap,wi=new WeakMap,F0),qw=T.createContext(void 0),uC=t=>{const e=T.useContext(qw);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},cC=({client:t,children:e})=>(T.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),C.jsx(qw.Provider,{value:t,children:e})),Kw=T.createContext(!1),dC=()=>T.useContext(Kw);Kw.Provider;function fC(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var hC=T.createContext(fC()),pC=()=>T.useContext(hC),mC=(t,e,n)=>{const s=n!=null&&n.state.error&&typeof t.throwOnError=="function"?Uw(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(e.isReset()||(t.retryOnMount=!1))},gC=t=>{T.useEffect(()=>{t.clearReset()},[t])},yC=({result:t,errorResetBoundary:e,throwOnError:n,query:s,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||Uw(n,[t.error,s])),vC=t=>{if(t.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},wC=(t,e)=>t.isLoading&&t.isFetching&&!e,xC=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,py=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function SC(t,e,n){var w,b,k,E;const s=dC(),o=pC(),l=uC(),u=l.defaultQueryOptions(t);(b=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||b.call(w,u);const d=l.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",vC(u),mC(u,o,d),gC(o);const f=!l.getQueryCache().get(u.queryHash),[p]=T.useState(()=>new e(l,u)),g=p.getOptimisticResult(u),y=!s&&t.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(x=>{const S=y?p.subscribe(gt.batchCalls(x)):Ft;return p.updateResult(),S},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),T.useEffect(()=>{p.setOptions(u)},[u,p]),xC(u,g))throw py(u,p,o);if(yC({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;if((E=(k=l.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||E.call(k,u,g),u.experimental_prefetchInRender&&!_s&&wC(g,s)){const x=f?py(u,p,o):d==null?void 0:d.promise;x==null||x.catch(Ft).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function EC(t,e){return SC(t,eC)}const bC=new lC({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Wl(){return Wl=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Qw(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function _C(){return Math.random().toString(36).substr(2,8)}function gy(t,e){return{usr:t.state,key:t.key,idx:e}}function of(t,e,n,s){return n===void 0&&(n=null),Wl({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?iu(e):e,{state:n,key:e&&e.key||s||_C()})}function Gw(t){let{pathname:e="/",search:n="",hash:s=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function iu(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let s=t.indexOf("?");s>=0&&(e.search=t.substr(s),t=t.substr(0,s)),t&&(e.pathname=t)}return e}function CC(t,e,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,u=o.history,d=Lr.Pop,f=null,p=g();p==null&&(p=0,u.replaceState(Wl({},u.state,{idx:p}),""));function g(){return(u.state||{idx:null}).idx}function y(){d=Lr.Pop;let x=g(),S=x==null?null:x-p;p=x,f&&f({action:d,location:E.location,delta:S})}function w(x,S){d=Lr.Push;let R=of(E.location,x,S);p=g()+1;let P=gy(R,p),O=E.createHref(R);try{u.pushState(P,"",O)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;o.location.assign(O)}l&&f&&f({action:d,location:E.location,delta:1})}function b(x,S){d=Lr.Replace;let R=of(E.location,x,S);p=g();let P=gy(R,p),O=E.createHref(R);u.replaceState(P,"",O),l&&f&&f({action:d,location:E.location,delta:0})}function k(x){let S=o.location.origin!=="null"?o.location.origin:o.location.href,R=typeof x=="string"?x:Gw(x);return R=R.replace(/ $/,"%20"),Bt(S,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,S)}let E={get action(){return d},get location(){return t(o,u)},listen(x){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(my,y),f=x,()=>{o.removeEventListener(my,y),f=null}},createHref(x){return e(o,x)},createURL:k,encodeLocation(x){let S=k(x);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:w,replace:b,go(x){return u.go(x)}};return E}var yy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(yy||(yy={}));function PC(t,e,n){return n===void 0&&(n="/"),kC(t,e,n)}function kC(t,e,n,s){let o=typeof e=="string"?iu(e):e,l=Jw(o.pathname||"/",n);if(l==null)return null;let u=Xw(t);RC(u);let d=null,f=VC(l);for(let p=0;d==null&&p{let f={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};f.relativePath.startsWith("/")&&(Bt(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let p=ai([s,f.relativePath]),g=n.concat(f);l.children&&l.children.length>0&&(Bt(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),Xw(l.children,e,g,p)),!(l.path==null&&!l.index)&&e.push({path:p,score:IC(p,l.index),routesMeta:g})};return t.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let f of Yw(l.path))o(l,u,f)}),e}function Yw(t){let e=t.split("/");if(e.length===0)return[];let[n,...s]=e,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let u=Yw(s.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...u),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function RC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:FC(e.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const AC=/^:[\w-]+$/,OC=3,NC=2,DC=1,LC=10,MC=-2,vy=t=>t==="*";function IC(t,e){let n=t.split("/"),s=n.length;return n.some(vy)&&(s+=MC),e&&(s+=NC),n.filter(o=>!vy(o)).reduce((o,l)=>o+(AC.test(l)?OC:l===""?DC:LC),s)}function FC(t,e){return t.length===e.length&&t.slice(0,-1).every((s,o)=>s===e[o])?t[t.length-1]-e[e.length-1]:0}function jC(t,e,n){let{routesMeta:s}=t,o={},l="/",u=[];for(let d=0;d{let{paramName:w,isOptional:b}=g;if(w==="*"){let E=d[y]||"";u=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const k=d[y];return b&&!k?p[w]=void 0:p[w]=(k||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:u,pattern:t}}function UC(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Qw(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),s]}function VC(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Qw(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Jw(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,s=t.charAt(n);return s&&s!=="/"?null:t.slice(n)||"/"}const zC=t=>t.replace(/\/\/+/g,"/"),ai=t=>zC(t.join("/")),$C=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function WC(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Zw=["post","put","patch","delete"];new Set(Zw);const HC=["get",...Zw];new Set(HC);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Hl(){return Hl=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},x,{params:Object.assign({},d,x.params),pathname:ai([f,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:ai([f,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),l,n,s);return e&&E?T.createElement(Zo.Provider,{value:{location:Hl({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Lr.Pop}},E):E}function YC(){let t=iP(),e=WC(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:o},n):null,null)}const JC=T.createElement(YC,null);class ZC extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?T.createElement(ou.Provider,{value:this.props.routeContext},T.createElement(tx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function eP(t){let{routeContext:e,match:n,children:s}=t,o=T.useContext(qC);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(ou.Provider,{value:e},s)}function tP(t,e,n,s){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),s===void 0&&(s=null),t==null){var l;if(!n)return null;if(n.errors)t=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let u=t,d=(o=n)==null?void 0:o.errors;if(d!=null){let g=u.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);g>=0||Bt(!1),u=u.slice(0,Math.min(u.length,g+1))}let f=!1,p=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((g,y,w)=>{let b,k=!1,E=null,x=null;n&&(b=d&&y.route.id?d[y.route.id]:void 0,E=y.route.errorElement||JC,f&&(p<0&&w===0?(oP("route-fallback"),k=!0,x=null):p===w&&(k=!0,x=y.route.hydrateFallbackElement||null)));let S=e.concat(u.slice(0,w+1)),R=()=>{let P;return b?P=E:k?P=x:y.route.Component?P=T.createElement(y.route.Component,null):y.route.element?P=y.route.element:P=g,T.createElement(eP,{match:y,routeContext:{outlet:g,matches:S,isDataRoute:n!=null},children:P})};return n&&(y.route.ErrorBoundary||y.route.errorElement||w===0)?T.createElement(ZC,{location:n.location,revalidation:n.revalidation,component:E,error:b,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):R()},null)}var nx=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(nx||{});function nP(t){let e=T.useContext(KC);return e||Bt(!1),e}function rP(t){let e=T.useContext(ou);return e||Bt(!1),e}function sP(t){let e=rP(),n=e.matches[e.matches.length-1];return n.route.id||Bt(!1),n.route.id}function iP(){var t;let e=T.useContext(tx),n=nP(nx.UseRouteError),s=sP();return e!==void 0?e:(t=n.errors)==null?void 0:t[s]}const wy={};function oP(t,e,n){wy[t]||(wy[t]=!0)}function aP(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function af(t){Bt(!1)}function lP(t){let{basename:e="/",children:n=null,location:s,navigationType:o=Lr.Pop,navigator:l,static:u=!1,future:d}=t;Yf()&&Bt(!1);let f=e.replace(/^\/*/,"/"),p=T.useMemo(()=>({basename:f,navigator:l,static:u,future:Hl({v7_relativeSplatPath:!1},d)}),[f,d,l,u]);typeof s=="string"&&(s=iu(s));let{pathname:g="/",search:y="",hash:w="",state:b=null,key:k="default"}=s,E=T.useMemo(()=>{let x=Jw(g,f);return x==null?null:{location:{pathname:x,search:y,hash:w,state:b,key:k},navigationType:o}},[f,g,y,w,b,k,o]);return E==null?null:T.createElement(ex.Provider,{value:p},T.createElement(Zo.Provider,{children:n,value:E}))}function uP(t){let{children:e,location:n}=t;return GC(lf(e),n)}new Promise(()=>{});function lf(t,e){e===void 0&&(e=[]);let n=[];return T.Children.forEach(t,(s,o)=>{if(!T.isValidElement(s))return;let l=[...e,o];if(s.type===T.Fragment){n.push.apply(n,lf(s.props.children,l));return}s.type!==af&&Bt(!1),!s.props.index||!s.props.children||Bt(!1);let u={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(u.children=lf(s.props.children,l)),n.push(u)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const cP="6";try{window.__reactRouterVersion=cP}catch{}const dP="startTransition",xy=B0[dP];function fP(t){let{basename:e,children:n,future:s,window:o}=t,l=T.useRef();l.current==null&&(l.current=TC({window:o,v5Compat:!0}));let u=l.current,[d,f]=T.useState({action:u.action,location:u.location}),{v7_startTransition:p}=s||{},g=T.useCallback(y=>{p&&xy?xy(()=>f(y)):f(y)},[f,p]);return T.useLayoutEffect(()=>u.listen(g),[u,g]),T.useEffect(()=>aP(s),[s]),T.createElement(lP,{basename:e,children:n,location:d.location,navigationType:d.action,navigator:u,future:s})}var Sy;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Sy||(Sy={}));var Ey;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ey||(Ey={}));function rx(t,e){return function(){return t.apply(e,arguments)}}const{toString:hP}=Object.prototype,{getPrototypeOf:xi}=Object,{iterator:ea,toStringTag:sx}=Symbol,ql=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Bo=(t,e)=>{let n=t;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),ql(n,e))return!0;n=xi(n)}return!1},pP=(t,e)=>t!=null&&Bo(t,e)?t[e]:void 0,Zf=(t=>e=>{const n=hP.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),En=t=>(t=t.toLowerCase(),e=>Zf(e)===t),au=t=>e=>typeof e===t,{isArray:Cs}=Array,Si=au("undefined");function _i(t){return t!==null&&!Si(t)&&t.constructor!==null&&!Si(t.constructor)&&jt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ix=En("ArrayBuffer");function mP(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ix(t.buffer),e}const gP=au("string"),jt=au("function"),ox=au("number"),Ci=t=>t!==null&&typeof t=="object",yP=t=>t===!0||t===!1,Nl=t=>{if(!Ci(t))return!1;const e=xi(t);return(e===null||e===Object.prototype||xi(e)===null)&&!Bo(t,sx)&&!Bo(t,ea)},vP=t=>{if(!Ci(t)||_i(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},wP=En("Date"),xP=En("File"),SP=t=>!!(t&&typeof t.uri<"u"),EP=t=>t&&typeof t.getParts<"u",bP=En("Blob"),TP=En("FileList"),_P=t=>Ci(t)&&jt(t.pipe);function CP(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const by=CP(),Ty=typeof by.FormData<"u"?by.FormData:void 0,PP=t=>{if(!t)return!1;if(Ty&&t instanceof Ty)return!0;const e=xi(t);if(!e||e===Object.prototype||!jt(t.append))return!1;const n=Zf(t);return n==="formdata"||n==="object"&&jt(t.toString)&&t.toString()==="[object FormData]"},kP=En("URLSearchParams"),[RP,AP,OP,NP]=["ReadableStream","Request","Response","Headers"].map(En),DP=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ta(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,o;if(typeof t!="object"&&(t=[t]),Cs(t))for(s=0,o=t.length;s0;)if(o=n[s],e===o.toLowerCase())return o;return null}const us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lx=t=>!Si(t)&&t!==us;function uf(...t){const{caseless:e,skipUndefined:n}=lx(this)&&this||{},s={},o=(l,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=e&&typeof u=="string"&&ax(s,u)||u,f=ql(s,d)?s[d]:void 0;Nl(f)&&Nl(l)?s[d]=uf(f,l):Nl(l)?s[d]=uf({},l):Cs(l)?s[d]=l.slice():(!n||!Si(l))&&(s[d]=l)};for(let l=0,u=t.length;l(ta(e,(o,l)=>{n&&jt(o)?Object.defineProperty(t,l,{__proto__:null,value:rx(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,l,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),t),MP=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),IP=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},FP=(t,e,n,s)=>{let o,l,u;const d={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)u=o[l],(!s||s(u,t,e))&&!d[u]&&(e[u]=t[u],d[u]=!0);t=n!==!1&&xi(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},jP=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},BP=t=>{if(!t)return null;if(Cs(t))return t;let e=t.length;if(!ox(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},UP=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&xi(Uint8Array)),VP=(t,e)=>{const s=(t&&t[ea]).call(t);let o;for(;(o=s.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},zP=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},$P=En("HTMLFormElement"),WP=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),{propertyIsEnumerable:HP}=Object.prototype,qP=En("RegExp"),ux=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};ta(n,(o,l)=>{let u;(u=e(o,l,t))!==!1&&(s[l]=u||o)}),Object.defineProperties(t,s)},KP=t=>{ux(t,(e,n)=>{if(jt(t)&&["arguments","caller","callee"].includes(n))return!1;const s=t[n];if(jt(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},QP=(t,e)=>{const n={},s=o=>{o.forEach(l=>{n[l]=!0})};return Cs(t)?s(t):s(String(t).split(e)),n},GP=()=>{},XP=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function YP(t){return!!(t&&jt(t.append)&&t[sx]==="FormData"&&t[ea])}const JP=t=>{const e=new WeakSet,n=s=>{if(Ci(s)){if(e.has(s))return;if(_i(s))return s;if(!("toJSON"in s)){e.add(s);const o=Cs(s)?[]:{};return ta(s,(l,u)=>{const d=n(l);!Si(d)&&(o[u]=d)}),e.delete(s),o}}return s};return n(t)},ZP=En("AsyncFunction"),ek=t=>t&&(Ci(t)||jt(t))&&jt(t.then)&&jt(t.catch),cx=((t,e)=>t?setImmediate:e?((n,s)=>(us.addEventListener("message",({source:o,data:l})=>{o===us&&l===n&&s.length&&s.shift()()},!1),o=>{s.push(o),us.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",jt(us.postMessage)),tk=typeof queueMicrotask<"u"?queueMicrotask.bind(us):typeof process<"u"&&process.nextTick||cx,dx=t=>t!=null&&jt(t[ea]),nk=t=>t!=null&&Bo(t,ea)&&dx(t),M={isArray:Cs,isArrayBuffer:ix,isBuffer:_i,isFormData:PP,isArrayBufferView:mP,isString:gP,isNumber:ox,isBoolean:yP,isObject:Ci,isPlainObject:Nl,isEmptyObject:vP,isReadableStream:RP,isRequest:AP,isResponse:OP,isHeaders:NP,isUndefined:Si,isDate:wP,isFile:xP,isReactNativeBlob:SP,isReactNative:EP,isBlob:bP,isRegExp:qP,isFunction:jt,isStream:_P,isURLSearchParams:kP,isTypedArray:UP,isFileList:TP,forEach:ta,merge:uf,extend:LP,trim:DP,stripBOM:MP,inherits:IP,toFlatObject:FP,kindOf:Zf,kindOfTest:En,endsWith:jP,toArray:BP,forEachEntry:VP,matchAll:zP,isHTMLForm:$P,hasOwnProperty:ql,hasOwnProp:ql,hasOwnInPrototypeChain:Bo,getSafeProp:pP,reduceDescriptors:ux,freezeMethods:KP,toObjectSet:QP,toCamelCase:WP,noop:GP,toFiniteNumber:XP,findKey:ax,global:us,isContextDefined:lx,isSpecCompliantForm:YP,toJSONObject:JP,isAsyncFn:ZP,isThenable:ek,setImmediate:cx,asap:tk,isIterable:dx,isSafeIterable:nk},rk=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sk=t=>{const e={};let n,s,o;return t&&t.split(` `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),s=u.substring(o+1).trim(),!(!n||e[n]&&rk[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e};function ik(t){let e=0,n=t.length;for(;ee;){const s=t.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const ok=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ak=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function eh(t,e){return M.isArray(t)?t.map(n=>eh(n,e)):ik(String(t).replace(e,""))}const lk=t=>eh(t,ok),uk=t=>eh(t,ak);function fx(t){const e=Object.create(null);return M.forEach(t.toJSON(),(n,s)=>{e[s]=uk(n)}),e}const _y=Symbol("internals");function yo(t){return t&&String(t).trim().toLowerCase()}function Dl(t){return t===!1||t==null?t:M.isArray(t)?t.map(Dl):lk(String(t))}function ck(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const dk=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function gd(t,e,n,s,o){if(M.isFunction(s))return s.call(this,e,n);if(o&&(e=n),!!M.isString(e)){if(M.isString(s))return e.indexOf(s)!==-1;if(M.isRegExp(s))return s.test(e)}}function fk(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function hk(t,e){const n=M.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{__proto__:null,value:function(o,l,u){return this[s].call(this,e,o,l,u)},configurable:!0})})}let Ct=class{constructor(e){e&&this.set(e)}set(e,n,s){const o=this;function l(d,f,p){const g=yo(f);if(!g)return;const y=M.findKey(o,g);(!y||o[y]===void 0||p===!0||p===void 0&&o[y]!==!1)&&(o[y||f]=Dl(d))}const u=(d,f)=>M.forEach(d,(p,g)=>l(p,g,f));if(M.isPlainObject(e)||e instanceof this.constructor)u(e,n);else if(M.isString(e)&&(e=e.trim())&&!dk(e))u(sk(e),n);else if(M.isObject(e)&&M.isSafeIterable(e)){let d=Object.create(null),f,p;for(const g of e){if(!M.isArray(g))throw new TypeError("Object iterator must return a key-value pair");p=g[0],M.hasOwnProp(d,p)?(f=d[p],d[p]=M.isArray(f)?[...f,g[1]]:[f,g[1]]):d[p]=g[1]}u(d,n)}else e!=null&&l(n,e,s);return this}get(e,n){if(e=yo(e),e){const s=M.findKey(this,e);if(s){const o=this[s];if(!n)return o;if(n===!0)return ck(o);if(M.isFunction(n))return n.call(this,o,s);if(M.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=yo(e),e){const s=M.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||gd(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let o=!1;function l(u){if(u=yo(u),u){const d=M.findKey(s,u);d&&(!n||gd(s,s[d],d,n))&&(delete s[d],o=!0)}}return M.isArray(e)?e.forEach(l):l(e),o}clear(e){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const l=n[s];(!e||gd(this,this[l],l,e,!0))&&(delete this[l],o=!0)}return o}normalize(e){const n=this,s={};return M.forEach(this,(o,l)=>{const u=M.findKey(s,l);if(u){n[u]=Dl(o),delete n[l];return}const d=e?fk(l):String(l).trim();d!==l&&delete n[l],n[d]=Dl(o),s[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return M.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=e&&M.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[_y]=this[_y]={accessors:{}}).accessors,o=this.prototype;function l(u){const d=yo(u);s[d]||(hk(o,u),s[d]=!0)}return M.isArray(e)?e.forEach(l):l(e),this}};Ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.reduceDescriptors(Ct.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}});M.freezeMethods(Ct);const pk="[REDACTED ****]";function mk(t){if(M.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(M.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function gk(t,e){const n=new Set(e.map(l=>String(l).toLowerCase())),s=[],o=l=>{if(l===null||typeof l!="object"||M.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof Ct&&(l=l.toJSON()),s.push(l);let u;if(M.isArray(l))u=[],l.forEach((d,f)=>{const p=o(d);M.isUndefined(p)||(u[f]=p)});else{if(!M.isPlainObject(l)&&mk(l))return s.pop(),l;u=Object.create(null);for(const[d,f]of Object.entries(l)){const p=n.has(d.toLowerCase())?pk:o(f);M.isUndefined(p)||(u[d]=p)}}return s.pop(),u};return o(t)}let J=class hx extends Error{static from(e,n,s,o,l,u){const d=new hx(e.message,n||e.code,s,o,l);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),u&&Object.assign(d,u),d}constructor(e,n,s,o,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&M.hasOwnProp(e,"redact")?e.redact:void 0,s=M.isArray(n)&&n.length>0?gk(e,n):M.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";J.ERR_BAD_OPTION="ERR_BAD_OPTION";J.ECONNABORTED="ECONNABORTED";J.ETIMEDOUT="ETIMEDOUT";J.ECONNREFUSED="ECONNREFUSED";J.ERR_NETWORK="ERR_NETWORK";J.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";J.ERR_DEPRECATED="ERR_DEPRECATED";J.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";J.ERR_BAD_REQUEST="ERR_BAD_REQUEST";J.ERR_CANCELED="ERR_CANCELED";J.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";J.ERR_INVALID_URL="ERR_INVALID_URL";J.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yk=null,px=100;function cf(t){return M.isPlainObject(t)||M.isArray(t)}function mx(t){return M.endsWith(t,"[]")?t.slice(0,-2):t}function yd(t,e,n){return t?t.concat(e).map(function(o,l){return o=mx(o),!n&&l?"["+o+"]":o}).join(n?".":""):e}function vk(t){return M.isArray(t)&&!t.some(cf)}const wk=M.toFlatObject(M,{},null,function(e){return/^is[A-Z]/.test(e)});function lu(t,e,n){if(!M.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=M.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,P){return!M.isUndefined(P[R])});const s=n.metaTokens,o=n.visitor||k,l=n.dots,u=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?px:n.maxDepth,p=d&&M.isSpecCompliantForm(e),g=[];if(!M.isFunction(o))throw new TypeError("visitor must be a function");function y(S){if(S===null)return"";if(M.isDate(S))return S.toISOString();if(M.isBoolean(S))return S.toString();if(!p&&M.isBlob(S))throw new J("Blob is not supported. Use a Buffer instead.");if(M.isArrayBuffer(S)||M.isTypedArray(S)){if(p&&typeof d=="function")return new d([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new J("Blob is not supported. Use a Buffer instead.",J.ERR_NOT_SUPPORT)}return S}function w(S){if(S>f)throw new J("Object is too deeply nested ("+S+" levels). Max depth: "+f,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function b(S,R){if(f===1/0)return JSON.stringify(S);const P=[];return JSON.stringify(S,function(j,V){if(!M.isObject(V))return V;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push(V),w(R+P.length-1),V})}function k(S,R,P){let O=S;if(M.isReactNative(e)&&M.isReactNativeBlob(S))return e.append(yd(P,R,l),y(S)),!1;if(S&&!P&&typeof S=="object"){if(M.endsWith(R,"{}"))R=s?R:R.slice(0,-2),S=b(S,1);else if(M.isArray(S)&&vk(S)||(M.isFileList(S)||M.endsWith(R,"[]"))&&(O=M.toArray(S)))return R=mx(R),O.forEach(function(V,q){!(M.isUndefined(V)||V===null)&&e.append(u===!0?yd([R],q,l):u===null?R:R+"[]",y(V))}),!1}return cf(S)?!0:(e.append(yd(P,R,l),y(S)),!1)}const E=Object.assign(wk,{defaultVisitor:k,convertValue:y,isVisitable:cf});function x(S,R,P=0){if(!M.isUndefined(S)){if(w(P),g.indexOf(S)!==-1)throw new Error("Circular reference detected in "+R.join("."));g.push(S),M.forEach(S,function(j,V){(!(M.isUndefined(j)||j===null)&&o.call(e,j,M.isString(V)?V.trim():V,R,E))===!0&&x(j,R?R.concat(V):[V],P+1)}),g.pop()}}if(!M.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Cy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function th(t,e){this._pairs=[],t&&lu(t,this,e)}const gx=th.prototype;gx.append=function(e,n){this._pairs.push([e,n])};gx.toString=function(e){const n=e?s=>e.call(this,s,Cy):Cy;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function xk(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function yx(t,e,n){if(!e)return t;t=t||"";const s=M.isFunction(n)?{serialize:n}:n,o=M.getSafeProp(s,"encode")||xk,l=M.getSafeProp(s,"serialize");let u;if(l?u=l(e,s):u=M.isURLSearchParams(e)?e.toString():new th(e,s).toString(o),u){const d=t.indexOf("#");d!==-1&&(t=t.slice(0,d)),t+=(t.indexOf("?")===-1?"?":"&")+u}return t}class Py{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,function(s){s!==null&&e(s)})}}const nh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Sk=typeof URLSearchParams<"u"?URLSearchParams:th,Ek=typeof FormData<"u"?FormData:null,bk=typeof Blob<"u"?Blob:null,Tk={isBrowser:!0,classes:{URLSearchParams:Sk,FormData:Ek,Blob:bk},protocols:["http","https","file","blob","url","data"]},rh=typeof window<"u"&&typeof document<"u",df=typeof navigator=="object"&&navigator||void 0,_k=rh&&(!df||["ReactNative","NativeScript","NS"].indexOf(df.product)<0),Ck=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Pk=rh&&window.location.href||"http://localhost",kk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rh,hasStandardBrowserEnv:_k,hasStandardBrowserWebWorkerEnv:Ck,navigator:df,origin:Pk},Symbol.toStringTag,{value:"Module"})),yt={...kk,...Tk};function Rk(t,e){return lu(t,new yt.classes.URLSearchParams,{visitor:function(n,s,o,l){return yt.isNode&&M.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}const ky=px;function vx(t){if(t>ky)throw new J("FormData field is too deeply nested ("+t+" levels). Max depth: "+ky,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ak(t){const e=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(t))!==null;)vx(e.length),e.push(s[0]==="[]"?"":s[1]||s[0]);return e}function Ok(t){const e={},n=Object.keys(t);let s;const o=n.length;let l;for(s=0;s=n.length;return u=!u&&M.isArray(o)?o.length:u,f?(M.hasOwnProp(o,u)?o[u]=M.isArray(o[u])?o[u].concat(s):[o[u],s]:o[u]=s,!d):((!M.hasOwnProp(o,u)||!M.isObject(o[u]))&&(o[u]=[]),e(n,s,o[u],l)&&M.isArray(o[u])&&(o[u]=Ok(o[u])),!d)}if(M.isFormData(t)&&M.isFunction(t.entries)){const n={};return M.forEachEntry(t,(s,o)=>{e(Ak(s),o,n,0)}),n}return null}const ei=(t,e)=>t!=null&&M.hasOwnProp(t,e)?t[e]:void 0;function Nk(t,e,n){if(M.isString(t))try{return(e||JSON.parse)(t),M.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const na={transitional:nh,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,l=M.isObject(e);if(l&&M.isHTMLForm(e)&&(e=new FormData(e)),M.isFormData(e))return o?JSON.stringify(wx(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(l){const f=ei(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return Rk(e,f).toString();if((d=M.isFileList(e))||s.indexOf("multipart/form-data")>-1){const p=ei(this,"env"),g=p&&p.FormData;return lu(d?{"files[]":e}:e,g&&new g,f)}}return l||o?(n.setContentType("application/json",!1),Nk(e)):e}],transformResponse:[function(e){const n=ei(this,"transitional")||na.transitional,s=n&&n.forcedJSONParsing,o=ei(this,"responseType"),l=o==="json";if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(s&&!o||l)){const d=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(e,ei(this,"parseReviver"))}catch(f){if(d)throw f.name==="SyntaxError"?J.from(f,J.ERR_BAD_RESPONSE,this,null,ei(this,"response")):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch","query"],t=>{na.headers[t]={}});function vd(t,e){const n=this||na,s=e||n,o=Ct.from(s.headers);let l=s.data;return M.forEach(t,function(d){l=d.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function xx(t){return!!(t&&t.__CANCEL__)}let ra=class extends J{constructor(e,n,s){super(e??"canceled",J.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function Sx(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new J("Request failed with status code "+n.status,n.status>=400&&n.status<500?J.ERR_BAD_REQUEST:J.ERR_BAD_RESPONSE,n.config,n.request,n))}function Dk(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function Lk(t,e){t=t||10;const n=new Array(t),s=new Array(t);let o=0,l=0,u;return e=e!==void 0?e:1e3,function(f){const p=Date.now(),g=s[l];u||(u=p),n[o]=f,s[o]=p;let y=l,w=0;for(;y!==o;)w+=n[y++],y=y%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),p-u{n=g,o=null,l&&(clearTimeout(l),l=null),t(...p)};return[(...p)=>{const g=Date.now(),y=g-n;y>=s?u(p,g):(o=p,l||(l=setTimeout(()=>{l=null,u(o)},s-y)))},()=>o&&u(o)]}const Kl=(t,e,n=3)=>{let s=0;const o=Lk(50,250);return Mk(l=>{if(!l||typeof l.loaded!="number")return;const u=l.loaded,d=l.lengthComputable?l.total:void 0,f=d!=null?Math.min(u,d):u,p=Math.max(0,f-s),g=o(p);s=Math.max(s,f);const y={loaded:f,total:d,progress:d?f/d:void 0,bytes:p,rate:g||void 0,estimated:g&&d?(d-f)/g:void 0,event:l,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(y)},n)},Ry=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},Ay=t=>(...e)=>M.asap(()=>t(...e)),Ik=yt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,yt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,Fk=yt.hasStandardBrowserEnv?{write(t,e,n,s,o,l,u){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(e)}`];M.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),M.isString(s)&&d.push(`path=${s}`),M.isString(o)&&d.push(`domain=${o}`),l===!0&&d.push("secure"),M.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;nt instanceof Ct?{...t}:t;function Ps(t,e){t=t||{},e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(g,y,w,b){return M.isPlainObject(g)&&M.isPlainObject(y)?M.merge.call({caseless:b},g,y):M.isPlainObject(y)?M.merge({},y):M.isArray(y)?y.slice():y}function o(g,y,w,b){if(M.isUndefined(y)){if(!M.isUndefined(g))return s(void 0,g,w,b)}else return s(g,y,w,b)}function l(g,y){if(!M.isUndefined(y))return s(void 0,y)}function u(g,y){if(M.isUndefined(y)){if(!M.isUndefined(g))return s(void 0,g)}else return s(void 0,y)}function d(g){const y=M.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!M.isUndefined(y))if(M.isPlainObject(y)){if(M.hasOwnProp(y,g))return y[g]}else return;const w=M.hasOwnProp(t,"transitional")?t.transitional:void 0;if(M.isPlainObject(w)&&M.hasOwnProp(w,g))return w[g]}function f(g,y,w){if(M.hasOwnProp(e,w))return s(g,y);if(M.hasOwnProp(t,w))return s(void 0,g)}const p={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:f,headers:(g,y,w)=>o(Ny(g),Ny(y),w,!0)};return M.forEach(Object.keys({...t,...e}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const w=M.hasOwnProp(p,y)?p[y]:o,b=M.hasOwnProp(t,y)?t[y]:void 0,k=M.hasOwnProp(e,y)?e[y]:void 0,E=w(b,k,y);M.isUndefined(E)&&w!==f||(n[y]=E)}),M.hasOwnProp(e,"validateStatus")&&M.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(M.hasOwnProp(t,"validateStatus")?n.validateStatus=s(void 0,t.validateStatus):delete n.validateStatus),n}const Wk=["content-type","content-length"];function Hk(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([s,o])=>{Wk.includes(s.toLowerCase())&&t.set(s,o)})}const qk=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function bx(t){const e=Ps({},t),n=w=>M.hasOwnProp(e,w)?e[w]:void 0,s=n("data");let o=n("withXSRFToken");const l=n("xsrfHeaderName"),u=n("xsrfCookieName");let d=n("headers");const f=n("auth"),p=n("baseURL"),g=n("allowAbsoluteUrls"),y=n("url");if(e.headers=d=Ct.from(d),e.url=yx(Ex(p,y,g,e),n("params"),n("paramsSerializer")),f){const w=M.getSafeProp(f,"username")||"",b=M.getSafeProp(f,"password")||"";try{d.set("Authorization","Basic "+btoa(w+":"+(b?qk(b):"")))}catch(k){throw J.from(k,J.ERR_BAD_OPTION_VALUE,t)}}if(M.isFormData(s)&&(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv||M.isReactNative(s)?d.setContentType(void 0):M.isFunction(s.getHeaders)&&Hk(d,s.getHeaders(),n("formDataHeaderPolicy"))),yt.hasStandardBrowserEnv&&(M.isFunction(o)&&(o=o(e)),o===!0||o==null&&Ik(e.url))){const b=l&&u&&Fk.read(u);b&&d.set(l,b)}return e}const Kk=typeof XMLHttpRequest<"u",Qk=Kk&&function(t){return new Promise(function(n,s){const o=bx(t);let l=o.data;const u=Ct.from(o.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o,g,y,w,b,k;function E(){b&&b(),k&&k(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function S(){if(!x)return;const P=Ct.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),j={data:!d||d==="text"||d==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:P,config:t,request:x};Sx(function(q){n(q),E()},function(q){s(q),E()},j),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(S)},x.onabort=function(){x&&(s(new J("Request aborted",J.ECONNABORTED,t,x)),E(),x=null)},x.onerror=function(O){const j=O&&O.message?O.message:"Network Error",V=new J(j,J.ERR_NETWORK,t,x);V.event=O||null,s(V),E(),x=null},x.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const j=o.transitional||nh;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),s(new J(O,j.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,x)),E(),x=null},l===void 0&&u.setContentType(null),"setRequestHeader"in x&&M.forEach(fx(u),function(O,j){x.setRequestHeader(j,O)}),M.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),d&&d!=="json"&&(x.responseType=o.responseType),p&&([w,k]=Kl(p,!0),x.addEventListener("progress",w)),f&&x.upload&&([y,b]=Kl(f),x.upload.addEventListener("progress",y),x.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(g=P=>{x&&(s(!P||P.type?new ra(null,t,x):P),x.abort(),E(),x=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const R=Dk(o.url);if(R&&!yt.protocols.includes(R)){s(new J("Unsupported protocol "+R+":",J.ERR_BAD_REQUEST,t)),E();return}x.send(l||null)})},Gk=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let s=!1;const o=function(f){if(!s){s=!0,u();const p=f instanceof Error?f:this.reason;n.abort(p instanceof J?p:new ra(p instanceof Error?p.message:p))}};let l=e&&setTimeout(()=>{l=null,o(new J(`timeout of ${e}ms exceeded`,J.ETIMEDOUT))},e);const u=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),t=null)};t.forEach(f=>f.addEventListener("abort",o,{once:!0}));const{signal:d}=n;return d.unsubscribe=()=>M.asap(u),d},Xk=function*(t,e){let n=t.byteLength;if(n{const o=Yk(t,e);let l=0,u,d=f=>{u||(u=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:p,value:g}=await o.next();if(p){d(),f.close();return}let y=g.byteLength;if(n){let w=l+=y;n(w)}f.enqueue(new Uint8Array(g))}catch(p){throw d(p),p}},cancel(f){return d(f),o.return()}},{highWaterMark:2})},Ql=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Zk=(t,e,n)=>e+2b>=2&&s.charCodeAt(b-2)===37&&s.charCodeAt(b-1)===51&&(s.charCodeAt(b)===68||s.charCodeAt(b)===100);p>=0&&(s.charCodeAt(p)===61?(f++,p--):g(p)&&(f++,p-=3)),f===1&&p>=0&&(s.charCodeAt(p)===61||g(p))&&f++;const w=Math.floor(u/4)*3-(f||0);return w>0?w:0}let l=0;for(let u=0,d=s.length;u=55296&&f<=56319&&u+1=56320&&p<=57343?(l+=4,u++):l+=3}else l+=3}return l}const sh="1.18.1",Ly=64*1024,{isFunction:bl}=M,tR=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),My=t=>{if(!M.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Iy=(t,...e)=>{try{return!!t(...e)}catch{return!1}},nR=t=>{const e=t.indexOf("://");let n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},rR=t=>{const e=M.global!==void 0&&M.global!==null?M.global:globalThis,{ReadableStream:n,TextEncoder:s}=e;t=M.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:o,Request:l,Response:u}=t,d=o?bl(o):typeof fetch=="function",f=bl(l),p=bl(u);if(!d)return!1;const g=d&&bl(n),y=d&&(typeof s=="function"?(S=>R=>S.encode(R))(new s):async S=>new Uint8Array(await new l(S).arrayBuffer())),w=f&&g&&Iy(()=>{let S=!1;const R=new l(yt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),P=R.headers.has("Content-Type");return R.body!=null&&R.body.cancel(),S&&!P}),b=p&&g&&Iy(()=>M.isReadableStream(new u("").body)),k={stream:b&&(S=>S.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!k[S]&&(k[S]=(R,P)=>{let O=R&&R[S];if(O)return O.call(R);throw new J(`Response type '${S}' is not supported`,J.ERR_NOT_SUPPORT,P)})});const E=async S=>{if(S==null)return 0;if(M.isBlob(S))return S.size;if(M.isSpecCompliantForm(S))return(await new l(yt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(M.isArrayBufferView(S)||M.isArrayBuffer(S))return S.byteLength;if(M.isURLSearchParams(S)&&(S=S+""),M.isString(S))return(await y(S)).byteLength},x=async(S,R)=>{const P=M.toFiniteNumber(S.getContentLength());return P??E(R)};return async S=>{let{url:R,method:P,data:O,signal:j,cancelToken:V,timeout:q,onDownloadProgress:B,onUploadProgress:Y,responseType:ne,headers:ve,withCredentials:Ce="same-origin",fetchOptions:Se,maxContentLength:Z,maxBodyLength:_e}=bx(S);const Te=M.isNumber(Z)&&Z>-1,ce=M.isNumber(_e)&&_e>-1,Q=X=>M.hasOwnProp(S,X)?S[X]:void 0;let se=o||fetch;ne=ne?(ne+"").toLowerCase():"text";let z=Gk([j,V&&V.toAbortSignal()],q),L=null;const $=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let de,ge=null;const pe=()=>new J("Request body larger than maxBodyLength limit",J.ERR_BAD_REQUEST,S,L);try{let X;const Ee=Q("auth");if(Ee){const be=M.getSafeProp(Ee,"username")||"",dt=M.getSafeProp(Ee,"password")||"";X={username:be,password:dt}}if(nR(R)){const be=new URL(R,yt.origin);if(!X&&(be.username||be.password)){const dt=My(be.username),un=My(be.password);X={username:dt,password:un}}(be.username||be.password)&&(be.username="",be.password="",R=be.href)}if(X&&(ve.delete("authorization"),ve.set("Authorization","Basic "+btoa(tR((X.username||"")+":"+(X.password||""))))),Te&&typeof R=="string"&&R.startsWith("data:")&&eR(R)>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L);if(ce&&P!=="get"&&P!=="head"){const be=await E(O);if(typeof be=="number"&&isFinite(be)&&(de=be,be>_e))throw pe()}const Re=ce&&(M.isReadableStream(O)||M.isStream(O)),xe=(be,dt,un)=>Dy(be,Ly,cn=>{if(ce&&cn>_e)throw ge=pe();dt&&dt(cn)},un);if(w&&P!=="get"&&P!=="head"&&(Y||Re)){if(de=de??await x(ve,O),de!==0||Re){let be=new l(R,{method:"POST",body:O,duplex:"half"}),dt;if(M.isFormData(O)&&(dt=be.headers.get("content-type"))&&ve.setContentType(dt),be.body){const[un,cn]=Y&&Ry(de,Kl(Ay(Y)))||[];O=xe(be.body,un,cn)}}}else if(Re&&!f&&g&&P!=="get"&&P!=="head")O=xe(O);else if(Re&&f&&!w&&P!=="get"&&P!=="head")throw new J("Stream request bodies are not supported by the current fetch implementation",J.ERR_NOT_SUPPORT,S,L);M.isString(Ce)||(Ce=Ce?"include":"omit");const it=f&&"credentials"in l.prototype;if(M.isFormData(O)){const be=ve.getContentType();be&&/^multipart\/form-data/i.test(be)&&!/boundary=/i.test(be)&&ve.delete("content-type")}ve.set("User-Agent","axios/"+sh,!1);const Kt={...Se,signal:z,method:P.toUpperCase(),headers:fx(ve.normalize()),body:O,duplex:"half",credentials:it?Ce:void 0};L=f&&new l(R,Kt);let ct=await(f?se(L,Se):se(R,Kt));const ln=Ct.from(ct.headers);if(Te){const be=M.toFiniteNumber(ln.getContentLength());if(be!=null&&be>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L)}const Qt=b&&(ne==="stream"||ne==="response");if(b&&ct.body&&(B||Te||Qt&&$)){const be={};["status","statusText","headers"].forEach(In=>{be[In]=ct[In]});const dt=M.toFiniteNumber(ln.getContentLength()),[un,cn]=B&&Ry(dt,Kl(Ay(B),!0))||[];let er=0;const tr=In=>{if(Te&&(er=In,er>Z))throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L);un&&un(In)};ct=new u(Dy(ct.body,Ly,tr,()=>{cn&&cn(),$&&$()}),be)}ne=ne||"text";let Gt=await k[M.findKey(k,ne)||"text"](ct,S);if(Te&&!b&&!Qt){let be;if(Gt!=null&&(typeof Gt.byteLength=="number"?be=Gt.byteLength:typeof Gt.size=="number"?be=Gt.size:typeof Gt=="string"&&(be=typeof s=="function"?new s().encode(Gt).byteLength:Gt.length)),typeof be=="number"&&be>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,S,L)}return!Qt&&$&&$(),await new Promise((be,dt)=>{Sx(be,dt,{data:Gt,headers:Ct.from(ct.headers),status:ct.status,statusText:ct.statusText,config:S,request:L})})}catch(X){if($&&$(),z&&z.aborted&&z.reason instanceof J){const Ee=z.reason;throw Ee.config=S,L&&(Ee.request=L),X!==Ee&&Object.defineProperty(Ee,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),Ee}if(ge)throw L&&!ge.request&&(ge.request=L),ge;if(X instanceof J)throw L&&!X.request&&(X.request=L),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const Ee=new J("Network Error",J.ERR_NETWORK,S,L,X&&X.response);throw Object.defineProperty(Ee,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),Ee}throw J.from(X,X&&X.code,S,L,X&&X.response)}}},sR=new Map,Tx=t=>{let e=t&&t.env||{};const{fetch:n,Request:s,Response:o}=e,l=[s,o,n];let u=l.length,d=u,f,p,g=sR;for(;d--;)f=l[d],p=g.get(f),p===void 0&&g.set(f,p=d?new Map:rR(e)),g=p;return p};Tx();const ih={http:yk,xhr:Qk,fetch:{get:Tx}};M.forEach(ih,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Fy=t=>`- ${t}`,iR=t=>M.isFunction(t)||t===null||t===!1;function oR(t,e){t=M.isArray(t)?t:[t];const{length:n}=t;let s,o;const l={};for(let u=0;u`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=n?u.length>1?`since : `+u.map(Fy).join(` `):" "+Fy(u[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+d,J.ERR_NOT_SUPPORT)}return o}const _x={getAdapter:oR,adapters:ih};function wd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ra(null,t)}function jy(t){return wd(t),t.headers=Ct.from(t.headers),t.data=vd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_x.getAdapter(t.adapter||na.adapter,t)(t).then(function(s){wd(t),t.response=s;try{s.data=vd.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=Ct.from(s.headers),s},function(s){if(!xx(s)&&(wd(t),s&&s.response)){t.response=s.response;try{s.response.data=vd.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=Ct.from(s.response.headers)}return Promise.reject(s)})}const uu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{uu[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const By={};uu.transitional=function(e,n,s){function o(l,u){return"[Axios v"+sh+"] Transitional option '"+l+"'"+u+(s?". "+s:"")}return(l,u,d)=>{if(e===!1)throw new J(o(u," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!By[u]&&(By[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,u,d):!0}};uu.spelling=function(e){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function aR(t,e,n){if(typeof t!="object"||t===null)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let o=s.length;for(;o-- >0;){const l=s[o],u=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(u){const d=t[l],f=d===void 0||u(d,l,t);if(f!==!0)throw new J("option "+l+" must be "+f,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+l,J.ERR_BAD_OPTION)}}const Ll={assertOptions:aR,validators:uu},Et=Ll.validators;let xs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Py,response:new Py}}async request(e,n){try{return await this._request(e,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(` `);return u===-1?"":o.stack.slice(u+1)})();try{if(!s.stack)s.stack=l;else if(l){const u=l.indexOf(` `),d=u===-1?-1:l.indexOf(` `,u+1),f=d===-1?"":l.slice(d+1);String(s.stack).endsWith(f)||(s.stack+=` `+l)}}catch{}}throw s}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ps(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:l}=n;s!==void 0&&Ll.assertOptions(s,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean),legacyInterceptorReqResOrdering:Et.transitional(Et.boolean),advertiseZstdAcceptEncoding:Et.transitional(Et.boolean),validateStatusUndefinedResolves:Et.transitional(Et.boolean)},!1),o!=null&&(M.isFunction(o)?n.paramsSerializer={serialize:o}:Ll.assertOptions(o,{encode:Et.function,serialize:Et.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ll.assertOptions(n,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&M.merge(l.common,l[n.method]);l&&M.forEach(["delete","get","head","post","put","patch","query","common"],k=>{delete l[k]}),n.headers=Ct.concat(u,l);const d=[];let f=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(n)===!1)return;f=f&&E.synchronous;const x=n.transitional||nh;x&&x.legacyInterceptorReqResOrdering?d.unshift(E.fulfilled,E.rejected):d.push(E.fulfilled,E.rejected)});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let g,y=0,w;if(!f){const k=[jy.bind(this),void 0];for(k.unshift(...d),k.push(...p),w=k.length,g=Promise.resolve(n);y{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](o);s._listeners=null}),this.promise.then=o=>{let l;const u=new Promise(d=>{s.subscribe(d),l=d}).then(o);return u.cancel=function(){s.unsubscribe(l)},u},e(function(l,u,d){s.reason||(s.reason=new ra(l,u,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=s=>{e.abort(s)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Cx(function(o){e=o}),cancel:e}}};function uR(t){return function(n){return t.apply(null,n)}}function cR(t){return M.isObject(t)&&t.isAxiosError===!0}const ff={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ff).forEach(([t,e])=>{ff[e]=t});function Px(t){const e=new xs(t),n=rx(xs.prototype.request,e);return M.extend(n,xs.prototype,e,{allOwnKeys:!0}),M.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Px(Ps(t,o))},n}const Ze=Px(na);Ze.Axios=xs;Ze.CanceledError=ra;Ze.CancelToken=lR;Ze.isCancel=xx;Ze.VERSION=sh;Ze.toFormData=lu;Ze.AxiosError=J;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=uR;Ze.isAxiosError=cR;Ze.mergeConfig=Ps;Ze.AxiosHeaders=Ct;Ze.formToJSON=t=>wx(M.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=_x.getAdapter;Ze.HttpStatusCode=ff;Ze.default=Ze;const{Axios:c2,AxiosError:d2,CanceledError:f2,isCancel:h2,CancelToken:p2,VERSION:m2,all:g2,Cancel:y2,isAxiosError:v2,spread:w2,toFormData:x2,AxiosHeaders:S2,HttpStatusCode:E2,formToJSON:b2,getAdapter:T2,mergeConfig:_2,create:C2}=Ze,kx=typeof window>"u",Uy=!kx&&window.self!==window.top,dR=!kx&&typeof document>"u",xd=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),pt=[];for(let t=0;t<256;++t)pt.push((t+256).toString(16).slice(1));function fR(t,e=0){return(pt[t[e+0]]+pt[t[e+1]]+pt[t[e+2]]+pt[t[e+3]]+"-"+pt[t[e+4]]+pt[t[e+5]]+"-"+pt[t[e+6]]+pt[t[e+7]]+"-"+pt[t[e+8]]+pt[t[e+9]]+"-"+pt[t[e+10]]+pt[t[e+11]]+pt[t[e+12]]+pt[t[e+13]]+pt[t[e+14]]+pt[t[e+15]]).toLowerCase()}let Sd;const hR=new Uint8Array(16);function pR(){if(!Sd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Sd=crypto.getRandomValues.bind(crypto)}return Sd(hR)}const mR=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Vy={randomUUID:mR};function gR(t,e,n){var o;t=t||{};const s=t.random??((o=t.rng)==null?void 0:o.call(t))??pR();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,fR(s)}function yR(t,e,n){return Vy.randomUUID&&!t?Vy.randomUUID():gR(t)}const vo=typeof window<"u"?window:{base44SharedInstances:{}};function vR(t,e){return vo.base44SharedInstances||(vo.base44SharedInstances={}),vo.base44SharedInstances[t]||(vo.base44SharedInstances[t]={instance:e()}),vo.base44SharedInstances[t].instance}const wR="__user_heartbeat_event__",xR="__initialization_event__",SR="__session_duration_event__",zy="analytics-enable",$y="base44_analytics_session_id",ER={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},bR="analytics",je=vR(bR,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...ER,...OR()}})),TR=({axiosClient:t,serverUrl:e,appId:n,userAuthModule:s})=>{var o;const{maxQueueSize:l,throttleTime:u,batchSize:d}=je.config;if(!(!((o=je.config)===null||o===void 0)&&o.enabled)||dR)return{track:()=>{},cleanup:()=>{}};let f;const p=`${e}/api/apps/${n}/analytics/track/batch`,g=async P=>{await t.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:P}})},y=P=>{try{const O=JSON.stringify({events:P}),j=new Blob([O],{type:"application/json"});return typeof navigator>"u"||O.length>6e4||!navigator.sendBeacon(p,j)}catch{return!1}},w=async(P,O={})=>{if(P.length===0)return;const j=await AR(s),V=P.map(RR(j));try{(!O.isBeacon||!y(V))&&await g(V)}catch{}},b=()=>{Hy(w,{throttleTime:u,batchSize:d})},k=P=>{if(je.requestsQueue.length>=l)return;const O=kR();je.requestsQueue.push({...P,...O}),b()},E=()=>{Hy(w,{throttleTime:u,batchSize:d}),f=qy(k),CR()},x=()=>{Wy(),f==null||f(),PR(k);const P=je.requestsQueue.splice(0);w(P,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&E())},R=()=>{Wy(),f==null||f(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return b(),f=qy(k),_R(k),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:k,cleanup:R}};function Wy(){je.isProcessing=!1}async function Hy(t,e){if(je.isProcessing)return;je.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=e??{};for(;je.isProcessing&&je.requestsQueue.length>0;){const o=je.requestsQueue.splice(0,s);o.length&&await t(o),await new Promise(l=>setTimeout(l,n))}je.isProcessing=!1}function qy(t){var e;if(typeof window>"u"||je.isHeartBeatProcessing||((e=je.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};je.isHeartBeatProcessing=!0;const n=setInterval(()=>{t({eventName:wR})},je.config.heartBeatInterval);return()=>{clearInterval(n),je.isHeartBeatProcessing=!1}}function _R(t){typeof window>"u"||je.wasInitializationTracked||(je.wasInitializationTracked=!0,t({eventName:xR,properties:{referrer:document==null?void 0:document.referrer}}))}function CR(){typeof window>"u"||je.sessionStartTime!==null||(je.sessionStartTime=new Date().toISOString())}function PR(t){if(typeof window>"u"||je.sessionStartTime===null)return;const e=new Date().getTime()-new Date(je.sessionStartTime).getTime();je.sessionStartTime=null,t({eventName:SR,properties:{sessionDuration:e}})}function kR(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function RR(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let Eo=null;function Ky(){je.sessionContext=null,Eo=null}async function AR(t){if(!je.sessionContext){if(!t.hasToken())return{user_id:null,session_id:Gl()};if(!Eo){const s=Gl();Eo=t.me().then(o=>({user_id:o.id,session_id:s})).catch(()=>({user_id:null,session_id:s}))}const e=Eo,n=await e;return Eo===e&&(je.sessionContext=n),n}return je.sessionContext}function OR(){if(typeof window>"u"||!window.location)return;const e=new URLSearchParams(window.location.search).get(zy);if(e==null||!e.length)return;const n=new URLSearchParams(window.location.search);n.delete(zy);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:e==="true"}}function Gl(){if(typeof window>"u")return xd();try{const t=localStorage.getItem($y);if(!t){const e=xd();return localStorage.setItem($y,e),e}return t}catch{return xd()}}class NR extends Error{constructor(e,n,s,o,l){super(e),this.name="Base44Error",this.status=n,this.code=s,this.data=o,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function bo({baseURL:t,headers:e={},token:n,interceptResponses:s=!0,onError:o}){const l=Ze.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return n&&(l.defaults.headers.common.Authorization=`Bearer ${n}`),l.interceptors.request.use(u=>{typeof window<"u"&&window.location&&(u.headers.set("X-Origin-URL",window.location.href),u.headers.get("Authorization")||u.headers.set("X-Base44-Anonymous-Id",Gl()));const d=yR();if(u.requestId=d,Uy)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:t+u.url,method:u.method,body:u.data instanceof FormData?"[FormData object]":u.data}},"*")}catch{}return u}),s&&l.interceptors.response.use(u=>{var d;const f=(d=u.config)===null||d===void 0?void 0:d.requestId;try{Uy&&f&&window.parent.postMessage({type:"api-request-end",requestId:f,data:{statusCode:u.status,response:u.data}},"*")}catch{}return u.data},u=>{var d,f,p,g,y,w,b,k;const E=((f=(d=u.response)===null||d===void 0?void 0:d.data)===null||f===void 0?void 0:f.message)||((g=(p=u.response)===null||p===void 0?void 0:p.data)===null||g===void 0?void 0:g.detail)||u.message,x=new NR(E,(y=u.response)===null||y===void 0?void 0:y.status,(b=(w=u.response)===null||w===void 0?void 0:w.data)===null||b===void 0?void 0:b.code,(k=u.response)===null||k===void 0?void 0:k.data,u);return o==null||o(x),Promise.reject(x)}),l}function Qy(t){const{axios:e,appId:n,getSocket:s}=t;return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return LR(e,n,l,s)}})}function DR(t){var e;try{const n=JSON.parse(t);return{type:n.type,data:n.data,id:n.id||((e=n.data)===null||e===void 0?void 0:e.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function LR(t,e,n,s){const o=`/apps/${e}/entities/${n}`;return{async list(l,u,d,f){const p={};return l&&(p.sort=l),u&&(p.limit=u),d&&(p.skip=d),f&&(p.fields=Array.isArray(f)?f.join(","):f),t.get(o,{params:p})},async filter(l,u,d,f,p){const g={q:JSON.stringify(l)};return u&&(g.sort=u),d&&(g.limit=d),f&&(g.skip=f),p&&(g.fields=Array.isArray(p)?p.join(","):p),t.get(o,{params:g})},async get(l){return t.get(`${o}/${l}`)},async create(l){return t.post(o,l)},async update(l,u){return t.put(`${o}/${l}`,u)},async delete(l){return t.delete(`${o}/${l}`)},async deleteMany(l){return t.delete(o,{data:l})},async bulkCreate(l){return t.post(`${o}/bulk`,l)},async updateMany(l,u){return t.patch(`${o}/update-many`,{query:l,data:u})},async bulkUpdate(l){return t.put(`${o}/bulk`,l)},async importEntities(l){const u=new FormData;return u.append("file",l,l.name),t.post(`${o}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const u=`entities:${e}:${n}`;return s().subscribeToRoom(u,{update_model:p=>{var g;const y=DR(p.data);if(y){y.type!=="delete"&&(!((g=y.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${y.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${y.id}")\` to fetch the full record.`);try{l(y)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function MR(t,e){return{async call(n,s,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:u,...d}=o??{},f={...d,...l&&{path_params:l},...u&&{query_params:u}};return await t.post(`/apps/${e}/integrations/custom/${n}/${s}`,f)}}}function Gy(t,e){const n=MR(t,e);return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${u} must receive an object with named parameters, received: ${d}`);let f,p;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(f=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?f.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?f.append(g,JSON.stringify(d[g])):f.append(g,d[g])}),p="multipart/form-data"):(f=d,p="application/json"),o==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${u}`,f||d,{headers:{"Content-Type":p}}):t.post(`/apps/${e}/integration-endpoints/installable/${o}/integration-endpoints/${u}`,f||d,{headers:{"Content-Type":p}})}}})}})}function IR(){return typeof window>"u"?!1:window!==window.parent}function FR(t,e,n){const l=Math.round(window.screenX+(window.outerWidth-500)/2),u=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(t,"base44_auth",`width=500,height=600,left=${l},top=${u},resizable=yes,scrollbars=yes`);if(!d)return;const f=()=>{window.removeEventListener("message",p),clearInterval(g),d.closed||d.close()},p=y=>{var w;if(y.origin!==n||y.source!==d||!(!((w=y.data)===null||w===void 0)&&w.access_token))return;f();const b=new URL(e),{access_token:k,is_new_user:E}=y.data;b.searchParams.set("access_token",k),E!=null&&b.searchParams.set("is_new_user",String(E)),window.location.href=b.toString()},g=setInterval(()=>{d.closed&&f()},500);window.addEventListener("message",p)}function jR(t,e,n,s){let o=null;const l=()=>{o=null};let u=!!s.token;return{hasToken(){return u},async me(){const d=o??t.get(`/apps/${n}/entities/User/me`).finally(()=>{o===d&&(o=null)});return o=d,d},async updateMe(d){return t.put(`/apps/${n}/entities/User/me`,d)},redirectToLogin(d){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const f=d?new URL(d,window.location.origin).toString():window.location.href,p=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(f)}`;window.location.href=p},loginWithProvider(d,f="/"){const p=new URL(f,window.location.origin).toString(),g=`app_id=${n}&from_url=${encodeURIComponent(p)}`;let y;d==="sso"?y=`/apps/${n}/auth/sso/login`:y=`/apps/auth${d==="google"?"":`/${d}`}/login`;const w=`${s.appBaseUrl}/api${y}?${g}`;if(IR()){const b=`${w}&popup_origin=${encodeURIComponent(window.location.origin)}`;return FR(b,p,window.location.origin)}window.location.href=w},logout(d){if(delete t.defaults.headers.common.Authorization,l(),Ky(),u=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(g){console.error("Failed to remove token from localStorage:",g)}const f=d||window.location.href,p=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(f)}`;window.location.href=p}},setToken(d,f=!0){if(d&&(l(),Ky(),u=!0,t.defaults.headers.common.Authorization=`Bearer ${d}`,e.defaults.headers.common.Authorization=`Bearer ${d}`,f&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",d),window.localStorage.setItem("token",d)}catch(p){console.error("Failed to save token to localStorage:",p)}},async loginViaEmailPassword(d,f,p){var g;try{const y=await t.post(`/apps/${n}/auth/login`,{email:d,password:f,...p&&{turnstile_token:p}}),{access_token:w,user:b}=y;return w&&this.setToken(w),{access_token:w,user:b}}catch(y){throw((g=y.response)===null||g===void 0?void 0:g.status)===401&&await this.logout(),y}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(d,f){return t.post(`/apps/${n}/users/invite-user`,{user_email:d,role:f})},register(d){return t.post(`/apps/${n}/auth/register`,d)},verifyOtp({email:d,otpCode:f}){return t.post(`/apps/${n}/auth/verify-otp`,{email:d,otp_code:f})},resendOtp(d){return t.post(`/apps/${n}/auth/resend-otp`,{email:d})},resetPasswordRequest(d){return t.post(`/apps/${n}/auth/reset-password-request`,{email:d})},resetPassword({resetToken:d,newPassword:f}){return t.post(`/apps/${n}/auth/reset-password`,{reset_token:d,new_password:f})},changePassword({userId:d,currentPassword:f,newPassword:p}){return t.post(`/apps/${n}/auth/change-password`,{user_id:d,current_password:f,new_password:p})}}}function BR(t,e){return{async getAccessToken(n){const s=`/apps/${e}/auth/sso/accesstoken/${n}`;return t.get(s)},async getIdToken(n){const s=`/apps/${e}/auth/sso/idtoken/${n}`;return t.get(s)}}}function UR(t,e){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/connectors/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}}}}function VR(t,e){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${n}`)}}}function Ss(t={}){const{storageKey:e="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:o=!0}=t;let l=null;if(typeof window<"u"&&window.location)try{const u=new URLSearchParams(window.location.search);if(l=u.get(n),l){if(s&&zR(l,{storageKey:e}),o){u.delete(n);const d=`${window.location.pathname}${u.toString()?`?${u.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(u){console.error("Error retrieving token from URL:",u)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(e),l}catch(u){console.error("Error retrieving token from local storage:",u)}return null}function zR(t,e){const{storageKey:n="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(n,t),window.localStorage.setItem("token",t),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function Xy(t,e,n){const s=(l,u)=>l?`${String(l).replace(/\/$/,"")}${u}`:u,o=l=>{const u=new Headers;if(n!=null&&n.getAuthHeaders){const d=n.getAuthHeaders();Object.entries(d).forEach(([f,p])=>{p!=null&&u.set(f,String(p))})}return l&&new Headers(l).forEach((d,f)=>{u.set(f,d)}),u};return{async invoke(l,u){if(typeof u=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${u}`);let d,f;return u instanceof FormData||u&&Object.values(u).some(p=>p instanceof File)?(d=new FormData,Object.keys(u).forEach(p=>{u[p]instanceof File?d.append(p,u[p],u[p].name):typeof u[p]=="object"&&u[p]!==null?d.append(p,JSON.stringify(u[p])):d.append(p,u[p])}),f="multipart/form-data"):(d=u,f="application/json"),t.post(`/apps/${e}/functions/${l}`,d||u,{headers:{"Content-Type":f}})},async fetch(l,u={}){const f=`/functions${l.startsWith("/")?l:`/${l}`}`,p=o(u.headers),g={...u,headers:p};return await fetch(s(n==null?void 0:n.baseURL,f),g)}}}function Yy({axios:t,getSocket:e,appId:n,serverUrl:s,token:o}){const l=`/apps/${n}/agents`,u={},d=()=>t.get(`${l}/conversations`),f=E=>t.get(`${l}/conversations/${E}`);return{getConversations:d,getConversation:f,listConversations:E=>t.get(`${l}/conversations`,{params:E}),createConversation:E=>t.post(`${l}/conversations`,E),addMessage:async(E,x)=>t.post(`${l}/conversations/v2/${E.id}/messages`,x),subscribeToConversation:(E,x)=>{const S=`/agent-conversations/${E}`,R=e(),P=f(E).then(O=>(u[E]=O,O));return R.subscribeToRoom(S,{connect:()=>{},update_model:async({data:O})=>{const j=JSON.parse(O);if(j._message){await P;const V=j._message,q=u[E];if(q){const B=q.messages||[],Y=B.findIndex(ve=>ve.id===V.id),ne=Y!==-1?B.map((ve,Ce)=>Ce===Y?V:ve):[...B,V];u[E]={...q,messages:ne},x==null||x(u[E])}}}})},getWhatsAppConnectURL:E=>{const x=`${s}/api/apps/${n}/agents/${encodeURIComponent(E)}/whatsapp`,S=o??Ss();return S?`${x}?token=${S}`:x},getTelegramConnectURL:E=>{const x=`${s}/api/apps/${n}/agents/${encodeURIComponent(E)}/telegram`,S=o??Ss();return S?`${x}?token=${S}`:x}}}function Jy({serverUrl:t,token:e,appId:n}){return{connection:()=>{var o;return{baseURL:`${t}/api/apps/${n}/ai/openai/v1`,token:(o=e??Ss())!==null&&o!==void 0?o:""}}}}function Zy(t,e){const n=`/app-logs/${e}`;return{async logUserInApp(s){await t.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await t.get(n,{params:s})},async getStats(s={}){return await t.get(`${n}/stats`,{params:s})}}}function $R(t,e){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Ln=Object.create(null);Ln.open="0";Ln.close="1";Ln.ping="2";Ln.pong="3";Ln.message="4";Ln.upgrade="5";Ln.noop="6";const Ml=Object.create(null);Object.keys(Ln).forEach(t=>{Ml[Ln[t]]=t});const hf={type:"error",data:"parser error"},Rx=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ax=typeof ArrayBuffer=="function",Ox=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,oh=({type:t,data:e},n,s)=>Rx&&e instanceof Blob?n?s(e):ev(e,s):Ax&&(e instanceof ArrayBuffer||Ox(e))?n?s(e):ev(new Blob([e]),s):s(Ln[t]+(e||"")),ev=(t,e)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];e("b"+(s||""))},n.readAsDataURL(t)};function tv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Ed;function WR(t,e){if(Rx&&t.data instanceof Blob)return t.data.arrayBuffer().then(tv).then(e);if(Ax&&(t.data instanceof ArrayBuffer||Ox(t.data)))return e(tv(t.data));oh(t,!1,n=>{Ed||(Ed=new TextEncoder),e(Ed.encode(n))})}const nv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",To=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,s,o=0,l,u,d,f;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const p=new ArrayBuffer(e),g=new Uint8Array(p);for(s=0;s>4,g[o++]=(u&15)<<4|d>>2,g[o++]=(d&3)<<6|f&63;return p},qR=typeof ArrayBuffer=="function",ah=(t,e)=>{if(typeof t!="string")return{type:"message",data:Nx(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:KR(t.substring(1),e)}:Ml[n]?t.length>1?{type:Ml[n],data:t.substring(1)}:{type:Ml[n]}:hf},KR=(t,e)=>{if(qR){const n=HR(t);return Nx(n,e)}else return{base64:!0,data:t}},Nx=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Dx="",QR=(t,e)=>{const n=t.length,s=new Array(n);let o=0;t.forEach((l,u)=>{oh(l,!1,d=>{s[u]=d,++o===n&&e(s.join(Dx))})})},GR=(t,e)=>{const n=t.split(Dx),s=[];for(let o=0;o{const s=n.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}let bd;function Tl(t){return t.reduce((e,n)=>e+n.length,0)}function _l(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let s=0;for(let o=0;oMath.pow(2,21)-1){d.enqueue(hf);break}o=g*Math.pow(2,32)+p.getUint32(4),s=3}else{if(Tl(n)t){d.enqueue(hf);break}}}})}const Lx=4;function tt(t){if(t)return JR(t)}function JR(t){for(var e in tt.prototype)t[e]=tt.prototype[e];return t}tt.prototype.on=tt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};tt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};tt.prototype.off=tt.prototype.removeListener=tt.prototype.removeAllListeners=tt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,o=0;oPromise.resolve().then(e):(e,n)=>n(e,0),an=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),ZR="arraybuffer";function Mx(t,...e){return e.reduce((n,s)=>(t.hasOwnProperty(s)&&(n[s]=t[s]),n),{})}const eA=an.setTimeout,tA=an.clearTimeout;function du(t,e){e.useNativeTimers?(t.setTimeoutFn=eA.bind(an),t.clearTimeoutFn=tA.bind(an)):(t.setTimeoutFn=an.setTimeout.bind(an),t.clearTimeoutFn=an.clearTimeout.bind(an))}const nA=1.33;function rA(t){return typeof t=="string"?sA(t):Math.ceil((t.byteLength||t.size)*nA)}function sA(t){let e=0,n=0;for(let s=0,o=t.length;s=57344?n+=3:(s++,n+=4);return n}function Ix(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function iA(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function oA(t){let e={},n=t.split("&");for(let s=0,o=n.length;s{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};GR(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,QR(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ix()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Fx=!1;try{Fx=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const uA=Fx;function cA(){}class dA extends lA{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,n){const s=this.request({method:"POST",data:e});s.on("success",n),s.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=e}}class On extends tt{constructor(e,n,s){super(),this.createRequest=e,du(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const n=Mx(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=On.requestsCount++,On.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=cA,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete On.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}On.requestsCount=0;On.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rv);else if(typeof addEventListener=="function"){const t="onpagehide"in an?"pagehide":"unload";addEventListener(t,rv,!1)}}function rv(){for(let t in On.requests)On.requests.hasOwnProperty(t)&&On.requests[t].abort()}const fA=(function(){const t=jx({xdomain:!1});return t&&t.responseType!==null})();class hA extends dA{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=fA&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new On(jx,this.uri(),e)}}function jx(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||uA))return new XMLHttpRequest}catch{}if(!e)try{return new an[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Bx=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pA extends lh{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,s=Bx?{}:Mx(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(s,l)}catch{}o&&cu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ix()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Td=an.WebSocket||an.MozWebSocket;class mA extends pA{createSocket(e,n,s){return Bx?new Td(e,n,s):n?new Td(e,n):new Td(e)}doWrite(e,n){this.ws.send(n)}}class gA extends lh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=YR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(n).getReader(),o=XR();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const l=()=>{s.read().then(({done:d,value:f})=>{d||(this.onPacket(f),l())}).catch(d=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{o&&cu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const yA={websocket:mA,webtransport:gA,polling:hA},vA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,wA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pf(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));let o=vA.exec(t||""),l={},u=14;for(;u--;)l[wA[u]]=o[u]||"";return n!=-1&&s!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=xA(l,l.path),l.queryKey=SA(l,l.query),l}function xA(t,e){const n=/\/{2,9}/g,s=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function SA(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,l){o&&(n[o]=l)}),n}const mf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Il=[];mf&&addEventListener("offline",()=>{Il.forEach(t=>t())},!1);class Ir extends tt{constructor(e,n){if(super(),this.binaryType=ZR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const s=pf(e);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=pf(n.host).host);du(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=oA(this.opts.query)),mf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Il.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Lx,n.transport=e,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ir.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ir.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,cu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,s){return this._sendPacket("message",e,n,s),this}send(e,n,s){return this._sendPacket("message",e,n,s),this}_sendPacket(e,n,s,o){if(typeof n=="function"&&(o=n,n=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:e,data:n,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(Ir.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),mf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Il.indexOf(this._offlineEventListener);s!==-1&&Il.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ir.protocol=Lx;class EA extends Ir{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ir.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){s||(s=!0,g(),n.close(),n=null)}const u=y=>{const w=new Error("probe error: "+y);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function d(){u("transport closed")}function f(){u("socket closed")}function p(y){n&&y.name!==n.name&&l()}const g=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",d),this.off("close",f),this.off("upgrading",p)};n.once("open",o),n.once("error",u),n.once("close",d),this.once("close",f),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let s=0;syA[l]).filter(l=>!!l)),super(s?o:e,o)}};function TA(t,e="",n){let s=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),s=pf(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+e,s.href=s.protocol+"://"+l+(n&&n.port===s.port?"":":"+s.port),s}const _A=typeof ArrayBuffer=="function",CA=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ux=Object.prototype.toString,PA=typeof Blob=="function"||typeof Blob<"u"&&Ux.call(Blob)==="[object BlobConstructor]",kA=typeof File=="function"||typeof File<"u"&&Ux.call(File)==="[object FileConstructor]";function uh(t){return _A&&(t instanceof ArrayBuffer||CA(t))||PA&&t instanceof Blob||kA&&t instanceof File}function Fl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,s=t.length;n=0&&t.numthis.opts.maxAttachments)throw new Error("too many attachments");s.attachments=d}if(e.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););s.nsp=e.substring(l,n)}else s.nsp="/";const o=e.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const u=e.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===e.length)break}s.id=Number(e.substring(l,n+1))}if(e.charAt(++n)){const l=this.tryParse(e.substr(n));if(ch.isPayloadValid(s.type,l))s.data=l;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case Ne.CONNECT:return sv(n);case Ne.DISCONNECT:return n===void 0;case Ne.CONNECT_ERROR:return typeof n=="string"||sv(n);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&OA.indexOf(n[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class DA{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=AA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const LA=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function sv(t){return Object.prototype.toString.call(t)==="[object Object]"}const MA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ch,Encoder:NA,get PacketType(){return Ne}},Symbol.toStringTag,{value:"Module"}));function Sn(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const IA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vx extends tt{constructor(e,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Sn(e,"open",this.onopen.bind(this)),Sn(e,"packet",this.onpacket.bind(this)),Sn(e,"error",this.onerror.bind(this)),Sn(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var s,o,l;if(IA.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Ne.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),u.id=g}const d=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(e,n){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(l),n.apply(this,d)};u.withError=!0,this.acks[e]=u}emitWithAck(e,...n){return new Promise((s,o)=>{const l=(u,d)=>u?o(u):s(d);l.withError=!0,n.push(l),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...l)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ne.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(e);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(e);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let s=!1;return function(...o){s||(s=!0,n.packet({type:Ne.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let s=0;s0&&t.jitter<=1?t.jitter:0,this.attempts=0}Pi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Pi.prototype.reset=function(){this.attempts=0};Pi.prototype.setMin=function(t){this.ms=t};Pi.prototype.setMax=function(t){this.max=t};Pi.prototype.setJitter=function(t){this.jitter=t};class vf extends tt{constructor(e,n){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,du(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Pi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||MA;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new bA(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Sn(n,"open",function(){s.onopen(),e&&e()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},u=Sn(n,"error",l);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(u),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Sn(e,"ping",this.onping.bind(this)),Sn(e,"data",this.ondata.bind(this)),Sn(e,"error",this.onerror.bind(this)),Sn(e,"close",this.onclose.bind(this)),Sn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){cu(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Vx(this,e,n),this.nsps[e]=s),s}_destroy(e){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let s=0;se()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const wo={};function jl(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=TA(t,e.path||"/socket.io"),s=n.source,o=n.id,l=n.path,u=wo[o]&&l in wo[o].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||u;let f;return d?f=new vf(s,e):(wo[o]||(wo[o]=new vf(s,e)),f=wo[o]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}Object.assign(jl,{Manager:vf,Socket:Vx,io:jl,connect:jl});const FA=250;function iv(t,e){var n;const s=(n=t.token)!==null&&n!==void 0?n:Ss(),o={app_id:t.appId,token:s};s||(o.anonymous_id=Gl());const l=jl(t.serverUrl,{path:t.mountPath,transports:t.transports,query:o});return l.on("connect",async()=>{var u;return console.log("connect",l.id),(u=e.connect)===null||u===void 0?void 0:u.call(e)}),l.on("update_model",async u=>{var d;return(d=e.update_model)===null||d===void 0?void 0:d.call(e,u)}),l.on("error",async u=>{var d;return(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l.on("connect_error",async u=>{var d;return console.error("connect_error",u),(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l}function jA({config:t}){let e={...t};const n={},s={},o={connect:async()=>{const S=[];Object.keys(n).forEach(R=>{const P=w(R);P.length!==0&&(p(R),P.forEach(({connect:O})=>{const j=async()=>O==null?void 0:O();S.push(j())}))}),await Promise.all(S)},update_model:async S=>{const P=w(S.room).map(O=>{var j;return(j=O.update_model)===null||j===void 0?void 0:j.call(O,S)});await Promise.all(P)},error:async S=>{console.error("error",S);const R=Object.values(n).flat().map(P=>{var O;return(O=P.error)===null||O===void 0?void 0:O.call(P,S)});await Promise.all(R)}};let l=iv(t,o);function u(){d()}function d(){k(),l&&l.disconnect()}function f(S){u(),e={...e,...S},l=iv(e,o)}function p(S){l.emit("join",S)}function g(S){l.emit("leave",S)}async function y(S,R){var P;const O=JSON.stringify(R);return(P=o.update_model)===null||P===void 0?void 0:P.call(o,{room:S,data:O})}function w(S){var R;return(R=n[S])!==null&&R!==void 0?R:[]}function b(S){const R=s[S];R&&(clearTimeout(R),delete s[S])}function k(){Object.keys(s).forEach(S=>{var R,P;clearTimeout(s[S]),delete s[S],((P=(R=n[S])===null||R===void 0?void 0:R.length)!==null&&P!==void 0?P:0)===0&&delete n[S]})}function E(S){b(S),s[S]=setTimeout(()=>{var R,P;delete s[S],!(((P=(R=n[S])===null||R===void 0?void 0:R.length)!==null&&P!==void 0?P:0)>0)&&(g(S),delete n[S])},FA)}return{socket:l,subscribeToRoom:(S,R)=>{n[S]?b(S):(p(S),n[S]=[]),n[S].push(R);let P=!1;return()=>{var O,j;P||(P=!0,n[S]=(j=(O=n[S])===null||O===void 0?void 0:O.filter(V=>V!==R))!==null&&j!==void 0?j:[],n[S].length===0&&E(S))}},updateConfig:f,updateModel:y,disconnect:d}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var zx=class extends Event{constructor(e,n){super("error",n);Me(this,"message");Me(this,"error");this.message=e.message,this.error=e}},$x=class extends Event{constructor(e=1e3,n="",s){super("close",s);Me(this,"code");Me(this,"reason");Me(this,"wasClean",!0);this.code=e,this.reason=n}},_d={Event,ErrorEvent:zx,CloseEvent:$x};function BA(t,e){if(!t)throw new Error(e)}function UA(t){return new t.constructor(t.type,t)}function VA(t){return"data"in t?new MessageEvent(t.type,t):"code"in t||"reason"in t?new $x(t.code||1999,t.reason||"unknown reason",t):"error"in t?new zx(t.error,t):new Event(t.type,t)}var j0,zA=typeof process<"u"&&typeof((j0=process.versions)==null?void 0:j0.node)<"u"&&typeof document>"u",Cl=zA?VA:UA,rs={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},ov=!1,$A=class is extends EventTarget{constructor(n,s,o={}){super();Me(this,"_ws");Me(this,"_retryCount",-1);Me(this,"_uptimeTimeout");Me(this,"_connectTimeout");Me(this,"_shouldReconnect",!0);Me(this,"_connectLock",!1);Me(this,"_binaryType","blob");Me(this,"_closeCalled",!1);Me(this,"_messageQueue",[]);Me(this,"_url");Me(this,"_protocols");Me(this,"_options");Me(this,"onclose",null);Me(this,"onerror",null);Me(this,"onmessage",null);Me(this,"onopen",null);Me(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=rs.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),BA(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var l;return(l=this._ws)==null?void 0:l.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Cl(n))});Me(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Cl(n))});Me(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Cl(n)),this._connect()});Me(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Cl(n))});this._url=n,this._protocols=s,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return is.CONNECTING}get OPEN(){return is.OPEN}get CLOSING(){return is.CLOSING}get CLOSED(){return is.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,o)=>(typeof o=="string"?s+=o.length:o instanceof Blob?s+=o.size:s+=o.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?is.CLOSED:is.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=rs.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=rs.reconnectionDelayGrowFactor,minReconnectionDelay:s=rs.minReconnectionDelay,maxReconnectionDelay:o=rs.maxReconnectionDelay}=this._options;let l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>o&&(l=o)),this._debug("next delay",l),l}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=rs.maxRetries,connectionTimeout:s=rs.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,l])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!ov&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),ov=!0);const u=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:l}),this._ws=l?new u(o,l):new u(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(o=>{this._connectLock=!1,this._handleError(new _d.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new _d.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new _d.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var WA=t=>t[1]!==null&&t[1]!==void 0;function HA(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let s=Math.random()*16;return t>0?(s=(t+s)%16|0,t=Math.floor(t/16)):(s=(e+s)%16|0,e=Math.floor(e/16)),(n==="x"?s:s&3|8).toString(16)})}function Wx(t,e,n={}){const{host:s,path:o,protocol:l,room:u,party:d,query:f}=t;let p=s.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const g=d??"main",y=o?`/${o}`:"",w=l||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?e:e+"s"),b=`${w}://${p}/${d?`parties/${d}`:"party"}/${u}${y}`,k=(x={})=>`${b}?${new URLSearchParams([...Object.entries(n),...Object.entries(x).filter(WA)])}`,E=typeof f=="function"?async()=>k(await f()):k(f);return{host:p,path:y,room:u,name:g,protocol:w,partyUrl:b,urlProvider:E}}var qA=class extends $A{constructor(e){const n=av(e);super(n.urlProvider,n.protocols,n.socketOptions);Me(this,"_pk");Me(this,"_pkurl");Me(this,"name");Me(this,"room");Me(this,"host");Me(this,"path");this.partySocketOptions=e,this.setWSProperties(n)}updateProperties(e){const n=av({...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(e){const{_pk:n,_pkurl:s,name:o,room:l,host:u,path:d}=e;this._pk=n,this._pkurl=s,this.name=o,this.room=l,this.host=u,this.path=d}reconnect(e,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(e,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,n){const s=Wx(e,"http"),o=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(e.fetch??fetch)(o,n)}};function av(t){const{id:e,host:n,path:s,party:o,room:l,protocol:u,query:d,protocols:f,...p}=t,g=e||HA(),y=Wx(t,"ws",{_pk:g});return{_pk:g,_pkurl:y.partyUrl,name:y.name,room:y.room,host:y.host,path:y.path,protocols:f,socketOptions:p,urlProvider:y.urlProvider}}const KA=1e3,QA=3e3;class GA{constructor(e,n,s,o,l){var u;this.onClose=l,this.listeners=new Set,this.heartbeat=null,this.id=(u=o==null?void 0:o.id)!==null&&u!==void 0?u:crypto.randomUUID();const d=new qA({host:s.host,party:e,room:n,id:this.id,query:()=>{const g=s.getAuthToken();return{app_id:s.appId,handler:e,...g?{token:g}:{},...s.functionsVersion?{fv:s.functionsVersion}:{}}}});this.ws=d;let f=Date.now();const p=()=>{f=Date.now()};d.addEventListener("open",p),d.addEventListener("message",g=>{p();let y;try{y=JSON.parse(g.data)}catch{return}if((y&&typeof y=="object"?y.type:void 0)!=="__pong")for(const b of this.listeners)b(y)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>QA){p(),d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},KA)}subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}send(e){this.ws.send(JSON.stringify(e))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function XA(t,e,n,s){let o=null;return{connect(l){if(o)return o;const u=new GA(t,e,n,l,()=>{s.delete(u),o===u&&(o=null)});return o=u,s.add(u),u}}}function YA(t,e){return t&&!t.startsWith("/")?t:e??t}function JA(t){const e=new Set;return{module:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"))return l=>XA(o,l,t,e)}}),closeAll:()=>{for(const s of[...e])s.close()}}}function ZA(t){var e,n,s;const{serverUrl:o="https://base44.app",appId:l,token:u,serviceToken:d,requiresAuth:f=!1,appBaseUrl:p,options:g,functionsVersion:y,headers:w}=t,b=typeof p=="string"?p:"",k={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:u};let E=null;const x=()=>(E||(E=jA({config:k})),E),S={...w,"X-App-Id":String(l)},R=y?{...S,"Base44-Functions-Version":y}:S,P=bo({baseURL:`${o}/api`,headers:S,token:u,onError:g==null?void 0:g.onError}),O=bo({baseURL:`${o}/api`,headers:R,token:u,interceptResponses:!1,onError:g==null?void 0:g.onError}),j={...S,...u?{"on-behalf-of":`Bearer ${u}`}:{}},V=bo({baseURL:`${o}/api`,headers:j,token:d,onError:g==null?void 0:g.onError}),q=bo({baseURL:`${o}/api`,headers:R,token:d,interceptResponses:!1}),B=jR(P,O,l,{appBaseUrl:b,token:u});if(typeof window<"u"){const Se=u||Ss();Se&&B.setToken(Se)}const Y=JA({appId:l,host:YA(o,typeof window<"u"?(e=window.location)===null||e===void 0?void 0:e.origin:void 0),functionsVersion:y,getAuthToken:()=>u||Ss()}),ne={entities:Qy({axios:P,appId:l,getSocket:x}),integrations:Gy(P,l),connectors:VR(P,l),auth:B,functions:Xy(O,l,{getAuthHeaders:()=>{const Se={},Z=u||Ss();return Z&&(Se.Authorization=`Bearer ${Z}`),Se},baseURL:(n=O.defaults)===null||n===void 0?void 0:n.baseURL}),agents:Yy({axios:P,getSocket:x,appId:l,serverUrl:o,token:u}),aiGateway:Jy({serverUrl:o,token:u,appId:l}),appLogs:Zy(P,l),users:$R(P,l),analytics:TR({axiosClient:P,serverUrl:o,appId:l,userAuthModule:B}),actors:Y.module,cleanup:()=>{ne.analytics.cleanup(),Y.closeAll(),E&&E.disconnect()}},ve={entities:Qy({axios:V,appId:l,getSocket:x}),integrations:Gy(V,l),sso:BR(V,l),connectors:UR(V,l),functions:Xy(q,l,{getAuthHeaders:()=>{const Se={};return d&&(Se.Authorization=`Bearer ${d}`),Se},baseURL:(s=q.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Yy({axios:V,getSocket:x,appId:l,serverUrl:o,token:u}),aiGateway:Jy({serverUrl:o,token:d,appId:l}),appLogs:Zy(V,l),cleanup:()=>{E&&E.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await ne.auth.isAuthenticated()||ne.auth.redirectToLogin(window.location.href)}catch(Se){console.error("Authentication check failed:",Se),ne.auth.redirectToLogin(window.location.href)}},0),{...ne,setToken(Se){ne.auth.setToken(Se),E&&E.updateConfig({token:Se}),k.token=Se},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return ve}}}const Hx=typeof window>"u",eO=Hx?{localStorage:new Map}:window,Oo=eO.localStorage,tO=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),ti=(t,{defaultValue:e=void 0,removeFromUrl:n=!1}={})=>{if(Hx)return e;const s=`base44_${tO(t)}`,o=new URLSearchParams(window.location.search),l=o.get(t);if(n){o.delete(t);const d=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return Oo.setItem(s,l),l;if(e)return Oo.setItem(s,e),e;const u=Oo.getItem(s);return u||null},nO=()=>(ti("clear_access_token")==="true"&&(Oo.removeItem("base44_access_token"),Oo.removeItem("token")),{appId:ti("app_id",{defaultValue:"6a87b9774d371bbc8677cab7"}),token:ti("access_token",{removeFromUrl:!0}),fromUrl:ti("from_url",{defaultValue:window.location.href}),functionsVersion:ti("functions_version",{defaultValue:"prod"}),appBaseUrl:ti("app_base_url",{defaultValue:void 0})}),_o={...nO()},{appId:rO,token:sO,functionsVersion:iO,appBaseUrl:oO}=_o,Co=ZA({appId:rO,token:sO,functionsVersion:iO,serverUrl:"",requiresAuth:!1,appBaseUrl:oO});function aO({}){var o;const e=Jf().pathname.substring(1),{data:n,isFetched:s}=EC({queryKey:["user"],queryFn:async()=>{try{return{user:await Co.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return C.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:C.jsx("div",{className:"max-w-md w-full",children:C.jsxs("div",{className:"text-center space-y-6",children:[C.jsxs("div",{className:"space-y-2",children:[C.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),C.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),C.jsxs("div",{className:"space-y-3",children:[C.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),C.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",C.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&C.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:C.jsxs("div",{className:"flex items-start space-x-3",children:[C.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:C.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),C.jsxs("div",{className:"text-left space-y-1",children:[C.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),C.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),C.jsx("div",{className:"pt-6",children:C.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[C.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const qx=T.createContext(),lO=({children:t})=>{const[e,n]=T.useState(null),[s,o]=T.useState(!1),[l,u]=T.useState(!0),[d,f]=T.useState(!0),[p,g]=T.useState(null),[y,w]=T.useState(!1),[b,k]=T.useState(null);T.useEffect(()=>{E()},[]);const E=async()=>{var P,O;try{f(!0),g(null);const j=bo({baseURL:"/api/apps/public",headers:{"X-App-Id":_o.appId},token:_o.token,interceptResponses:!0});try{const V=await j.get(`/prod/public-settings/by-id/${_o.appId}`);k(V),_o.token?await x():(u(!1),o(!1),w(!0)),f(!1)}catch(V){if(console.error("App state check failed:",V),V.status===403&&((O=(P=V.data)==null?void 0:P.extra_data)!=null&&O.reason)){const q=V.data.extra_data.reason;g(q==="auth_required"?{type:"auth_required",message:"Authentication required"}:q==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:q,message:V.message})}else g({type:"unknown",message:V.message||"Failed to load app"});f(!1),u(!1)}}catch(j){console.error("Unexpected error:",j),g({type:"unknown",message:j.message||"An unexpected error occurred"}),f(!1),u(!1)}},x=async()=>{try{u(!0);const P=await Co.auth.me();n(P),o(!0),u(!1),w(!0)}catch(P){console.error("User auth check failed:",P),u(!1),o(!1),w(!0),(P.status===401||P.status===403)&&g({type:"auth_required",message:"Authentication required"})}},S=(P=!0)=>{n(null),o(!1),P?Co.auth.logout(window.location.href):Co.auth.logout()},R=()=>{Co.auth.redirectToLogin(window.location.href)};return C.jsx(qx.Provider,{value:{user:e,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:p,appPublicSettings:b,authChecked:y,logout:S,navigateToLogin:R,checkUserAuth:x,checkAppState:E},children:t})},uO=()=>{const t=T.useContext(qx);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},cO=()=>C.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:C.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:C.jsxs("div",{className:"text-center",children:[C.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:C.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),C.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),C.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),C.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[C.jsx("p",{children:"If you believe this is an error, you can:"}),C.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[C.jsx("li",{children:"Verify you are logged in with the correct account"}),C.jsx("li",{children:"Contact the app administrator for access"}),C.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),dO=t=>{const e=t.slice(1);try{return decodeURIComponent(e)}catch{return e}};function fO(){const{pathname:t,hash:e}=Jf(),n=QC();return T.useEffect(()=>{if(n!=="POP"){if(e){const s=dO(e),o=window.setTimeout(()=>{var l;(l=document.getElementById(s))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[t,e,n]),null}const lv=[{label:"Home",path:"/"},{label:"About Us",path:"/about-us",active:!0},{label:"What We Do",path:"/what-we-do"},{label:"Media Hub",path:"/media-hub"},{label:"Careers",path:"/careers"},{label:"Get in Touch",path:"/contact"}];function hO(){const[t,e]=T.useState(!1),[n,s]=T.useState(!1);return T.useEffect(()=>{const o=()=>e(window.scrollY>24);return window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),C.jsxs("header",{className:"fixed top-0 inset-x-0 z-50 transition-colors duration-300",style:{background:t?"#FFFFFF":"rgba(255,255,255,0.96)",borderBottom:"1px solid rgba(0,0,0,0.06)"},children:[C.jsxs("div",{className:"mx-auto flex items-center justify-between px-5 md:px-10 lg:px-16",style:{maxWidth:1440,height:80},children:[C.jsxs("a",{href:"/",className:"flex items-center","aria-label":"Alrazah Holding",children:[C.jsx("span",{className:"font-heading font-semibold tracking-[0.18em] text-[19px]",style:{color:"#1B1B1B"},children:"ALRAZAH"}),C.jsx("span",{className:"ml-2 text-[10px] tracking-[0.24em] font-medium uppercase",style:{color:"#8D0034"},children:"Holding"})]}),C.jsxs("nav",{className:"hidden lg:flex items-center gap-9",children:[lv.map(o=>C.jsx("a",{href:o.path,className:"text-[13px] font-medium tracking-[0.04em] transition-colors duration-200",style:{color:o.active?"#8D0034":"#4A4A4A"},children:o.label},o.label)),C.jsx("button",{"aria-label":"Search",className:"transition-colors duration-200",style:{color:"#4A4A4A"},children:C.jsx(WT,{size:17,strokeWidth:1.75})})]}),C.jsx("button",{className:"lg:hidden",onClick:()=>s(o=>!o),"aria-label":"Menu",style:{color:"#1B1B1B"},children:n?C.jsx(yw,{size:22}):C.jsx(zT,{size:22})})]}),n&&C.jsx("nav",{className:"lg:hidden px-5 pb-6 flex flex-col gap-1",style:{background:"#FFFFFF",borderTop:"1px solid rgba(0,0,0,0.06)"},children:lv.map(o=>C.jsx("a",{href:o.path,className:"py-3 text-[15px] font-medium",style:{color:o.active?"#8D0034":"#1B1B1B"},children:o.label},o.label))})]})}const Kx=T.createContext({});function pO(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const dh=T.createContext(null),Qx=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function mO(t=!0){const e=T.useContext(dh);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=e,l=T.useId();T.useEffect(()=>{t&&o(l)},[t]);const u=T.useCallback(()=>t&&s&&s(l),[l,s,t]);return!n&&s?[!1,u]:[!0]}const fh=typeof window<"u",gO=fh?T.useLayoutEffect:T.useEffect,Ht=t=>t;let Gx=Ht;function hh(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ei=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Yn=t=>t*1e3,Jn=t=>t/1e3,yO={useManualTiming:!1};function vO(t){let e=new Set,n=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(f.schedule(p),t()),p(u)}const f={schedule:(p,g=!1,y=!1)=>{const b=y&&s?e:n;return g&&l.add(p),b.has(p)||b.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(u=p,s){o=!0;return}s=!0,[e,n]=[n,e],e.forEach(d),e.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const Pl=["read","resolveKeyframes","update","preRender","render","postRender"],wO=40;function Xx(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=Pl.reduce((S,R)=>(S[R]=vO(l),S),{}),{read:d,resolveKeyframes:f,update:p,preRender:g,render:y,postRender:w}=u,b=()=>{const S=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(S-o.timestamp,wO),1),o.timestamp=S,o.isProcessing=!0,d.process(o),f.process(o),p.process(o),g.process(o),y.process(o),w.process(o),o.isProcessing=!1,n&&e&&(s=!1,t(b))},k=()=>{n=!0,s=!0,o.isProcessing||t(b)};return{schedule:Pl.reduce((S,R)=>{const P=u[R];return S[R]=(O,j=!1,V=!1)=>(n||k(),P.schedule(O,j,V)),S},{}),cancel:S=>{for(let R=0;Ruv[t].some(n=>!!e[n])};function xO(t){for(const e in t)bi[e]={...bi[e],...t[e]}}const SO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xl(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||SO.has(t)}let Jx=t=>!Xl(t);function EO(t){t&&(Jx=e=>e.startsWith("on")?!Xl(e):t(e))}try{EO(require("@emotion/is-prop-valid").default)}catch{}function bO(t,e,n){const s={};for(const o in t)o==="values"&&typeof t.values=="object"||(Jx(o)||n===!0&&Xl(o)||!e&&!Xl(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}function TO(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,o)=>o==="create"?t:(e.has(o)||e.set(o,t(o)),e.get(o))})}const fu=T.createContext({});function Uo(t){return typeof t=="string"||Array.isArray(t)}function hu(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const ph=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mh=["initial",...ph];function pu(t){return hu(t.animate)||mh.some(e=>Uo(t[e]))}function Zx(t){return!!(pu(t)||t.variants)}function _O(t,e){if(pu(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Uo(n)?n:void 0,animate:Uo(s)?s:void 0}}return t.inherit!==!1?e:{}}function CO(t){const{initial:e,animate:n}=_O(t,T.useContext(fu));return T.useMemo(()=>({initial:e,animate:n}),[cv(e),cv(n)])}function cv(t){return Array.isArray(t)?t.join(" "):t}const PO=Symbol.for("motionComponentSymbol");function ni(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function kO(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ni(n)&&(n.current=s))},[e])}const gh=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),RO="framerAppearId",eS="data-"+gh(RO),{schedule:yh}=Xx(queueMicrotask,!1),tS=T.createContext({});function AO(t,e,n,s,o){var l,u;const{visualElement:d}=T.useContext(fu),f=T.useContext(Yx),p=T.useContext(dh),g=T.useContext(Qx).reducedMotion,y=T.useRef(null);s=s||f.renderer,!y.current&&s&&(y.current=s(t,{visualState:e,parent:d,props:n,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const w=y.current,b=T.useContext(tS);w&&!w.projection&&o&&(w.type==="html"||w.type==="svg")&&OO(y.current,n,o,b);const k=T.useRef(!1);T.useInsertionEffect(()=>{w&&k.current&&w.update(n,p)});const E=n[eS],x=T.useRef(!!E&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,E))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,E)));return gO(()=>{w&&(k.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),yh.render(w.render),x.current&&w.animationState&&w.animationState.animateChanges())}),T.useEffect(()=>{w&&(!x.current&&w.animationState&&w.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)===null||S===void 0||S.call(window,E)}),x.current=!1))}),w}function OO(t,e,n,s){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:f,layoutRoot:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:nS(t.parent)),t.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&ni(d),visualElement:t,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:f,layoutRoot:p})}function nS(t){if(t)return t.options.allowProjection!==!1?t.projection:nS(t.parent)}function NO({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:o}){var l,u;t&&xO(t);function d(p,g){let y;const w={...T.useContext(Qx),...p,layoutId:DO(p)},{isStatic:b}=w,k=CO(p),E=s(p,b);if(!b&&fh){LO();const x=MO(w);y=x.MeasureLayout,k.visualElement=AO(o,E,w,e,x.ProjectionNode)}return C.jsxs(fu.Provider,{value:k,children:[y&&k.visualElement?C.jsx(y,{visualElement:k.visualElement,...w}):null,n(o,p,kO(E,k.visualElement,g),E,b,k.visualElement)]})}d.displayName=`motion.${typeof o=="string"?o:`create(${(u=(l=o.displayName)!==null&&l!==void 0?l:o.name)!==null&&u!==void 0?u:""})`}`;const f=T.forwardRef(d);return f[PO]=o,f}function DO({layoutId:t}){const e=T.useContext(Kx).id;return e&&t!==void 0?e+"-"+t:t}function LO(t,e){T.useContext(Yx).strict}function MO(t){const{drag:e,layout:n}=bi;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const IO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vh(t){return typeof t!="string"||t.includes("-")?!1:!!(IO.indexOf(t)>-1||/[A-Z]/u.test(t))}function dv(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function wh(t,e,n,s){if(typeof e=="function"){const[o,l]=dv(s);e=e(n!==void 0?n:t.custom,o,l)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,l]=dv(s);e=e(n!==void 0?n:t.custom,o,l)}return e}const wf=t=>Array.isArray(t),FO=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),jO=t=>wf(t)?t[t.length-1]||0:t,_t=t=>!!(t&&t.getVelocity);function Bl(t){const e=_t(t)?t.get():t;return FO(e)?e.toValue():e}function BO({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,o,l){const u={latestValues:UO(s,o,l,t),renderState:e()};return n&&(u.onMount=d=>n({props:s,current:d,...u}),u.onUpdate=d=>n(d)),u}const rS=t=>(e,n)=>{const s=T.useContext(fu),o=T.useContext(dh),l=()=>BO(t,e,s,o);return n?l():pO(l)};function UO(t,e,n,s){const o={},l=s(t,{});for(const w in l)o[w]=Bl(l[w]);let{initial:u,animate:d}=t;const f=pu(t),p=Zx(t);e&&p&&!f&&t.inherit!==!1&&(u===void 0&&(u=e.initial),d===void 0&&(d=e.animate));let g=n?n.initial===!1:!1;g=g||u===!1;const y=g?d:u;if(y&&typeof y!="boolean"&&!hu(y)){const w=Array.isArray(y)?y:[y];for(let b=0;be=>typeof e=="string"&&e.startsWith(t),iS=sS("--"),VO=sS("var(--"),xh=t=>VO(t)?zO.test(t.split("/*")[0].trim()):!1,zO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,oS=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Zn=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},Vo={...Ri,transform:t=>Zn(0,1,t)},kl={...Ri,default:1},sa=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),_r=sa("deg"),Nn=sa("%"),ye=sa("px"),$O=sa("vh"),WO=sa("vw"),fv={...Nn,parse:t=>Nn.parse(t)/100,transform:t=>Nn.transform(t*100)},HO={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},qO={rotate:_r,rotateX:_r,rotateY:_r,rotateZ:_r,scale:kl,scaleX:kl,scaleY:kl,scaleZ:kl,skew:_r,skewX:_r,skewY:_r,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Vo,originX:fv,originY:fv,originZ:ye},hv={...Ri,transform:Math.round},Sh={...HO,...qO,zIndex:hv,size:ye,fillOpacity:Vo,strokeOpacity:Vo,numOctaves:hv},KO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QO=ki.length;function GO(t,e,n){let s="",o=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),aS=()=>({...Th(),attrs:{}}),_h=t=>typeof t=="string"&&t.toLowerCase()==="svg";function lS(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.getProjectionStyles(s));for(const l in n)t.style.setProperty(l,n[l])}const uS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function cS(t,e,n,s){lS(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(uS.has(o)?o:gh(o),e.attrs[o])}const Yl={};function eN(t){Object.assign(Yl,t)}function dS(t,{layout:e,layoutId:n}){return Rs.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Yl[t]||t==="opacity")}function Ch(t,e,n){var s;const{style:o}=t,l={};for(const u in o)(_t(o[u])||e.style&&_t(e.style[u])||dS(u,t)||((s=n==null?void 0:n.getValue(u))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(l[u]=o[u]);return l}function fS(t,e,n){const s=Ch(t,e,n);for(const o in t)if(_t(t[o])||_t(e[o])){const l=ki.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=t[o]}return s}function tN(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const mv=["x","y","width","height","cx","cy","r"],nN={useVisualState:rS({scrapeMotionValuesFromProps:fS,createRenderState:aS,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:o})=>{if(!n)return;let l=!!t.drag;if(!l){for(const d in o)if(Rs.has(d)){l=!0;break}}if(!l)return;let u=!e;if(e)for(let d=0;d{tN(n,s),ze.render(()=>{bh(s,o,_h(n.tagName),t.transformTemplate),cS(n,s)})})}})},rN={useVisualState:rS({scrapeMotionValuesFromProps:Ch,createRenderState:Th})};function hS(t,e,n){for(const s in e)!_t(e[s])&&!dS(s,n)&&(t[s]=e[s])}function sN({transformTemplate:t},e){return T.useMemo(()=>{const n=Th();return Eh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function iN(t,e){const n=t.style||{},s={};return hS(s,n,t),Object.assign(s,sN(t,e)),s}function oN(t,e){const n={},s=iN(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function aN(t,e,n,s){const o=T.useMemo(()=>{const l=aS();return bh(l,e,_h(s),t.transformTemplate),{...l.attrs,style:{...l.style}}},[e]);if(t.style){const l={};hS(l,t.style,t),o.style={...l,...o.style}}return o}function lN(t=!1){return(n,s,o,{latestValues:l},u)=>{const f=(vh(n)?aN:oN)(s,l,u,n),p=bO(s,typeof n=="string",t),g=n!==T.Fragment?{...p,...f,ref:o}:{},{children:y}=s,w=T.useMemo(()=>_t(y)?y.get():y,[y]);return T.createElement(n,{...g,children:w})}}function uN(t,e){return function(s,{forwardMotionProps:o}={forwardMotionProps:!1}){const u={...vh(s)?nN:rN,preloadedFeatures:t,useRender:lN(o),createVisualElement:e,Component:s};return NO(u)}}function pS(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;swindow.ScrollTimeline!==void 0);class dN{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(cN()&&o.attachTimeline)return o.attachTimeline(e);if(typeof n=="function")return n(o)});return()=>{s.forEach((o,l)=>{o&&o(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;nn[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class fN extends dN{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function Ph(t,e){return t?t[e]||t.default||t:void 0}const xf=2e4;function mS(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=xf?1/0:e}function kh(t){return typeof t=="function"}function gv(t,e){t.timeline=e,t.onfinish=null}const Rh=t=>Array.isArray(t)&&typeof t[0]=="number",hN={linearEasing:void 0};function pN(t,e){const n=hh(t);return()=>{var s;return(s=hN[e])!==null&&s!==void 0?s:n()}}const Jl=pN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gS=(t,e,n=10)=>{let s="";const o=Math.max(Math.round(e/n),2);for(let l=0;l`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Sf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Po([0,.65,.55,1]),circOut:Po([.55,0,1,.45]),backIn:Po([.31,.01,.66,-.59]),backOut:Po([.33,1.53,.69,.99])};function vS(t,e){if(t)return typeof t=="function"&&Jl()?gS(t,e):Rh(t)?Po(t):Array.isArray(t)?t.map(n=>vS(n,e)||Sf.easeOut):Sf[t]}const vn={x:!1,y:!1};function wS(){return vn.x||vn.y}function mN(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let o=document;const l=(s=void 0)!==null&&s!==void 0?s:o.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t)}function xS(t,e){const n=mN(t),s=new AbortController,o={passive:!0,...e,signal:s.signal};return[n,o,()=>s.abort()]}function yv(t){return e=>{e.pointerType==="touch"||wS()||t(e)}}function gN(t,e,n={}){const[s,o,l]=xS(t,n),u=yv(d=>{const{target:f}=d,p=e(d);if(typeof p!="function"||!f)return;const g=yv(y=>{p(y),f.removeEventListener("pointerleave",g)});f.addEventListener("pointerleave",g,o)});return s.forEach(d=>{d.addEventListener("pointerenter",u,o)}),l}const SS=(t,e)=>e?t===e?!0:SS(t,e.parentElement):!1,Ah=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,yN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vN(t){return yN.has(t.tagName)||t.tabIndex!==-1}const ko=new WeakSet;function vv(t){return e=>{e.key==="Enter"&&t(e)}}function Pd(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const wN=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=vv(()=>{if(ko.has(n))return;Pd(n,"down");const o=vv(()=>{Pd(n,"up")}),l=()=>Pd(n,"cancel");n.addEventListener("keyup",o,e),n.addEventListener("blur",l,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function wv(t){return Ah(t)&&!wS()}function xN(t,e,n={}){const[s,o,l]=xS(t,n),u=d=>{const f=d.currentTarget;if(!wv(d)||ko.has(f))return;ko.add(f);const p=e(d),g=(b,k)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",w),!(!wv(b)||!ko.has(f))&&(ko.delete(f),typeof p=="function"&&p(b,{success:k}))},y=b=>{g(b,n.useGlobalTarget||SS(f,b.target))},w=b=>{g(b,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",w,o)};return s.forEach(d=>{!vN(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(n.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),d.addEventListener("focus",p=>wN(p,o),o)}),l}function SN(t){return t==="x"||t==="y"?vn[t]?null:(vn[t]=!0,()=>{vn[t]=!1}):vn.x||vn.y?null:(vn.x=vn.y=!0,()=>{vn.x=vn.y=!1})}const ES=new Set(["width","height","top","left","right","bottom",...ki]);let Ul;function EN(){Ul=void 0}const Dn={now:()=>(Ul===void 0&&Dn.set(mt.isProcessing||yO.useManualTiming?mt.timestamp:performance.now()),Ul),set:t=>{Ul=t,queueMicrotask(EN)}};function Oh(t,e){t.indexOf(e)===-1&&t.push(e)}function Nh(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Dh{constructor(){this.subscriptions=[]}add(e){return Oh(this.subscriptions,e),()=>Nh(this.subscriptions,e)}notify(e,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,s);else for(let l=0;l!isNaN(parseFloat(t));class TN{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,o=!0)=>{const l=Dn.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Dn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bN(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Dh);const s=this.events[e].add(n);return e==="change"?()=>{s(),ze.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xv);return bS(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zo(t,e){return new TN(t,e)}function _N(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,zo(n))}function CN(t,e){const n=mu(t,e);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const u in l){const d=jO(l[u]);_N(t,u,d)}}function PN(t){return!!(_t(t)&&t.add)}function Ef(t,e){const n=t.getValue("willChange");if(PN(n))return n.add(e)}function TS(t){return t.props[eS]}const _S=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,kN=1e-7,RN=12;function AN(t,e,n,s,o){let l,u,d=0;do u=e+(n-e)/2,l=_S(u,s,o)-t,l>0?n=u:e=u;while(Math.abs(l)>kN&&++dAN(l,0,1,t,n);return l=>l===0||l===1?l:_S(o(l),e,s)}const CS=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,PS=t=>e=>1-t(1-e),kS=ia(.33,1.53,.69,.99),Lh=PS(kS),RS=CS(Lh),AS=t=>(t*=2)<1?.5*Lh(t):.5*(2-Math.pow(2,-10*(t-1))),Mh=t=>1-Math.sin(Math.acos(t)),OS=PS(Mh),NS=CS(Mh),DS=t=>/^0[^.\s]+$/u.test(t);function ON(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||DS(t):!0}const No=t=>Math.round(t*1e5)/1e5,Ih=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function NN(t){return t==null}const DN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fh=(t,e)=>n=>!!(typeof n=="string"&&DN.test(n)&&n.startsWith(t)||e&&!NN(n)&&Object.prototype.hasOwnProperty.call(n,e)),LS=(t,e,n)=>s=>{if(typeof s!="string")return s;const[o,l,u,d]=s.match(Ih);return{[t]:parseFloat(o),[e]:parseFloat(l),[n]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},LN=t=>Zn(0,255,t),kd={...Ri,transform:t=>Math.round(LN(t))},cs={test:Fh("rgb","red"),parse:LS("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+kd.transform(t)+", "+kd.transform(e)+", "+kd.transform(n)+", "+No(Vo.transform(s))+")"};function MN(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const bf={test:Fh("#"),parse:MN,transform:cs.transform},ri={test:Fh("hsl","hue"),parse:LS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Nn.transform(No(e))+", "+Nn.transform(No(n))+", "+No(Vo.transform(s))+")"},Tt={test:t=>cs.test(t)||bf.test(t)||ri.test(t),parse:t=>cs.test(t)?cs.parse(t):ri.test(t)?ri.parse(t):bf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?cs.transform(t):ri.transform(t)},IN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FN(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ih))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(IN))===null||n===void 0?void 0:n.length)||0)>0}const MS="number",IS="color",jN="var",BN="var(",Sv="${}",UN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $o(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const d=e.replace(UN,f=>(Tt.test(f)?(s.color.push(l),o.push(IS),n.push(Tt.parse(f))):f.startsWith(BN)?(s.var.push(l),o.push(jN),n.push(f)):(s.number.push(l),o.push(MS),n.push(parseFloat(f))),++l,Sv)).split(Sv);return{values:n,split:d,indexes:s,types:o}}function FS(t){return $o(t).values}function jS(t){const{split:e,types:n}=$o(t),s=e.length;return o=>{let l="";for(let u=0;utypeof t=="number"?0:t;function zN(t){const e=FS(t);return jS(t)(e.map(VN))}const jr={test:FN,parse:FS,createTransformer:jS,getAnimatableNone:zN},$N=new Set(["brightness","contrast","saturate","opacity"]);function WN(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ih)||[];if(!s)return t;const o=n.replace(s,"");let l=$N.has(e)?1:0;return s!==n&&(l*=100),e+"("+l+o+")"}const HN=/\b([a-z-]*)\(.*?\)/gu,Tf={...jr,getAnimatableNone:t=>{const e=t.match(HN);return e?e.map(WN).join(" "):t}},qN={...Sh,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Tf,WebkitFilter:Tf},jh=t=>qN[t];function BS(t,e){let n=jh(t);return n!==Tf&&(n=jr),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const KN=new Set(["auto","none","0"]);function QN(t,e,n){let s=0,o;for(;st===Ri||t===ye,bv=(t,e)=>parseFloat(t.split(", ")[e]),Tv=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/u);if(o)return bv(o[1],e);{const l=s.match(/^matrix\((.+)\)$/u);return l?bv(l[1],t):0}},GN=new Set(["x","y","z"]),XN=ki.filter(t=>!GN.has(t));function YN(t){const e=[];return XN.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Ti={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Tv(4,13),y:Tv(5,14)};Ti.translateX=Ti.x;Ti.translateY=Ti.y;const Es=new Set;let _f=!1,Cf=!1;function US(){if(Cf){const t=Array.from(Es).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const o=YN(s);o.length&&(n.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,u])=>{var d;(d=s.getValue(l))===null||d===void 0||d.set(u)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Cf=!1,_f=!1,Es.forEach(t=>t.complete()),Es.clear()}function VS(){Es.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Cf=!0)})}function JN(){VS(),US()}class Bh{constructor(e,n,s,o,l,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Es.add(this),_f||(_f=!0,ze.read(VS),ze.resolveKeyframes(US))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:o}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ZN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eD(t){const e=ZN.exec(t);if(!e)return[,];const[,n,s,o]=e;return[`--${n??s}`,o]}function $S(t,e,n=1){const[s,o]=eD(t);if(!s)return;const l=window.getComputedStyle(e).getPropertyValue(s);if(l){const u=l.trim();return zS(u)?parseFloat(u):u}return xh(o)?$S(o,e,n+1):o}const WS=t=>e=>e.test(t),tD={test:t=>t==="auto",parse:t=>t},HS=[Ri,ye,Nn,_r,WO,$O,tD],_v=t=>HS.find(WS(t));class qS extends Bh{constructor(e,n,s,o,l){super(e,n,s,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const Cv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(jr.test(t)||t==="0")&&!t.startsWith("url("));function nD(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nt!==null;function gu(t,{repeat:e,repeatType:n="loop"},s){const o=t.filter(sD),l=e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const iD=40;class KS{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Dn.now(),this.options={autoplay:e,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:u,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>iD?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&JN(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Dn.now(),this.hasAttemptedResolve=!0;const{name:s,type:o,velocity:l,delay:u,onComplete:d,onUpdate:f,isGenerator:p}=this.options;if(!p&&!rD(e,s,o,l))if(u)this.options.duration=0;else{f&&f(gu(e,this.options,n)),d&&d(),this.resolveFinishedPromise();return}const g=this.initPlayback(e,n);g!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const qe=(t,e,n)=>t+(e-t)*n;function Rd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function oD({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,l=0,u=0;if(!e)o=l=u=n;else{const d=n<.5?n*(1+e):n+e-n*e,f=2*n-d;o=Rd(f,d,t+1/3),l=Rd(f,d,t),u=Rd(f,d,t-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:s}}function Zl(t,e){return n=>n>0?e:t}const Ad=(t,e,n)=>{const s=t*t,o=n*(e*e-s)+s;return o<0?0:Math.sqrt(o)},aD=[bf,cs,ri],lD=t=>aD.find(e=>e.test(t));function Pv(t){const e=lD(t);if(!e)return!1;let n=e.parse(t);return e===ri&&(n=oD(n)),n}const kv=(t,e)=>{const n=Pv(t),s=Pv(e);if(!n||!s)return Zl(t,e);const o={...n};return l=>(o.red=Ad(n.red,s.red,l),o.green=Ad(n.green,s.green,l),o.blue=Ad(n.blue,s.blue,l),o.alpha=qe(n.alpha,s.alpha,l),cs.transform(o))},uD=(t,e)=>n=>e(t(n)),oa=(...t)=>t.reduce(uD),Pf=new Set(["none","hidden"]);function cD(t,e){return Pf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function dD(t,e){return n=>qe(t,e,n)}function Uh(t){return typeof t=="number"?dD:typeof t=="string"?xh(t)?Zl:Tt.test(t)?kv:pD:Array.isArray(t)?QS:typeof t=="object"?Tt.test(t)?kv:fD:Zl}function QS(t,e){const n=[...t],s=n.length,o=t.map((l,u)=>Uh(l)(l,e[u]));return l=>{for(let u=0;u{for(const l in s)n[l]=s[l](o);return n}}function hD(t,e){var n;const s=[],o={color:0,var:0,number:0};for(let l=0;l{const n=jr.createTransformer(e),s=$o(t),o=$o(e);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Pf.has(t)&&!o.values.length||Pf.has(e)&&!s.values.length?cD(t,e):oa(QS(hD(s,o),o.values),n):Zl(t,e)};function GS(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?qe(t,e,n):Uh(t)(t,e)}const mD=5;function XS(t,e,n){const s=Math.max(e-mD,0);return bS(n-t(s),e-s)}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Od=.001;function gD({duration:t=Ge.duration,bounce:e=Ge.bounce,velocity:n=Ge.velocity,mass:s=Ge.mass}){let o,l,u=1-e;u=Zn(Ge.minDamping,Ge.maxDamping,u),t=Zn(Ge.minDuration,Ge.maxDuration,Jn(t)),u<1?(o=p=>{const g=p*u,y=g*t,w=g-n,b=kf(p,u),k=Math.exp(-y);return Od-w/b*k},l=p=>{const y=p*u*t,w=y*n+n,b=Math.pow(u,2)*Math.pow(p,2)*t,k=Math.exp(-y),E=kf(Math.pow(p,2),u);return(-o(p)+Od>0?-1:1)*((w-b)*k)/E}):(o=p=>{const g=Math.exp(-p*t),y=(p-n)*t+1;return-Od+g*y},l=p=>{const g=Math.exp(-p*t),y=(n-p)*(t*t);return g*y});const d=5/t,f=vD(o,l,d);if(t=Yn(t),isNaN(f))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:t};{const p=Math.pow(f,2)*s;return{stiffness:p,damping:u*2*Math.sqrt(s*p),duration:t}}}const yD=12;function vD(t,e,n){let s=n;for(let o=1;ot[n]!==void 0)}function SD(t){let e={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...t};if(!Rv(t,xD)&&Rv(t,wD))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*Zn(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:Ge.mass,stiffness:o,damping:l}}else{const n=gD(t);e={...e,...n,mass:Ge.mass},e.isResolvedFromDuration=!0}return e}function YS(t=Ge.visualDuration,e=Ge.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:p,mass:g,duration:y,velocity:w,isResolvedFromDuration:b}=SD({...n,velocity:-Jn(n.velocity||0)}),k=w||0,E=p/(2*Math.sqrt(f*g)),x=u-l,S=Jn(Math.sqrt(f/g)),R=Math.abs(x)<5;s||(s=R?Ge.restSpeed.granular:Ge.restSpeed.default),o||(o=R?Ge.restDelta.granular:Ge.restDelta.default);let P;if(E<1){const j=kf(S,E);P=V=>{const q=Math.exp(-E*S*V);return u-q*((k+E*S*x)/j*Math.sin(j*V)+x*Math.cos(j*V))}}else if(E===1)P=j=>u-Math.exp(-S*j)*(x+(k+S*x)*j);else{const j=S*Math.sqrt(E*E-1);P=V=>{const q=Math.exp(-E*S*V),B=Math.min(j*V,300);return u-q*((k+E*S*x)*Math.sinh(B)+j*x*Math.cosh(B))/j}}const O={calculatedDuration:b&&y||null,next:j=>{const V=P(j);if(b)d.done=j>=y;else{let q=0;E<1&&(q=j===0?Yn(k):XS(P,j,V));const B=Math.abs(q)<=s,Y=Math.abs(u-V)<=o;d.done=B&&Y}return d.value=d.done?u:V,d},toString:()=>{const j=Math.min(mS(O),xf),V=gS(q=>O.next(j*q).value,j,30);return j+"ms "+V}};return O}function Av({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:f,restDelta:p=.5,restSpeed:g}){const y=t[0],w={done:!1,value:y},b=B=>d!==void 0&&Bf,k=B=>d===void 0?f:f===void 0||Math.abs(d-B)-E*Math.exp(-B/s),P=B=>S+R(B),O=B=>{const Y=R(B),ne=P(B);w.done=Math.abs(Y)<=p,w.value=w.done?S:ne};let j,V;const q=B=>{b(w.value)&&(j=B,V=YS({keyframes:[w.value,k(w.value)],velocity:XS(P,B,w.value),damping:o,stiffness:l,restDelta:p,restSpeed:g}))};return q(0),{calculatedDuration:null,next:B=>{let Y=!1;return!V&&j===void 0&&(Y=!0,O(B),q(B)),j!==void 0&&B>=j?V.next(B-j):(!Y&&O(B),w)}}}const ED=ia(.42,0,1,1),bD=ia(0,0,.58,1),JS=ia(.42,0,.58,1),TD=t=>Array.isArray(t)&&typeof t[0]!="number",_D={linear:Ht,easeIn:ED,easeInOut:JS,easeOut:bD,circIn:Mh,circInOut:NS,circOut:OS,backIn:Lh,backInOut:RS,backOut:kS,anticipate:AS},Ov=t=>{if(Rh(t)){Gx(t.length===4);const[e,n,s,o]=t;return ia(e,n,s,o)}else if(typeof t=="string")return _D[t];return t};function CD(t,e,n){const s=[],o=n||GS,l=t.length-1;for(let u=0;ue[0];if(l===2&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=CD(e,s,o),f=d.length,p=g=>{if(u&&g1)for(;yp(Zn(t[0],t[l-1],g)):p}function kD(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=Ei(0,e,s);t.push(qe(n,1,o))}}function RD(t){const e=[0];return kD(e,t.length-1),e}function AD(t,e){return t.map(n=>n*e)}function OD(t,e){return t.map(()=>e||JS).splice(0,t.length-1)}function eu({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const o=TD(s)?s.map(Ov):Ov(s),l={done:!1,value:e[0]},u=AD(n&&n.length===e.length?n:RD(e),t),d=PD(u,e,{ease:Array.isArray(o)?o:OD(e,o)});return{calculatedDuration:t,next:f=>(l.value=d(f),l.done=f>=t,l)}}const ND=t=>{const e=({timestamp:n})=>t(n);return{start:()=>ze.update(e,!0),stop:()=>Fr(e),now:()=>mt.isProcessing?mt.timestamp:Dn.now()}},DD={decay:Av,inertia:Av,tween:eu,keyframes:eu,spring:YS},LD=t=>t/100;class Vh extends KS{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:f}=this.options;f&&f()};const{name:n,motionValue:s,element:o,keyframes:l}=this.options,u=(o==null?void 0:o.KeyframeResolver)||Bh,d=(f,p)=>this.onKeyframesResolved(f,p);this.resolver=new u(l,d,n,s,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=this.options,d=kh(n)?n:DD[n]||eu;let f,p;d!==eu&&typeof e[0]!="number"&&(f=oa(LD,GS(e[0],e[1])),e=[0,100]);const g=d({...this.options,keyframes:e});l==="mirror"&&(p=d({...this.options,keyframes:[...e].reverse(),velocity:-u})),g.calculatedDuration===null&&(g.calculatedDuration=mS(g));const{calculatedDuration:y}=g,w=y+o,b=w*(s+1)-o;return{generator:g,mirroredGenerator:p,mapPercentToKeyframes:f,calculatedDuration:y,resolvedDuration:w,totalDuration:b}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:B}=this.options;return{done:!0,value:B[B.length-1]}}const{finalKeyframe:o,generator:l,mirroredGenerator:u,mapPercentToKeyframes:d,keyframes:f,calculatedDuration:p,totalDuration:g,resolvedDuration:y}=s;if(this.startTime===null)return l.next(0);const{delay:w,repeat:b,repeatType:k,repeatDelay:E,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-g/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const S=this.currentTime-w*(this.speed>=0?1:-1),R=this.speed>=0?S<0:S>g;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let P=this.currentTime,O=l;if(b){const B=Math.min(this.currentTime,g)/y;let Y=Math.floor(B),ne=B%1;!ne&&B>=1&&(ne=1),ne===1&&Y--,Y=Math.min(Y,b+1),!!(Y%2)&&(k==="reverse"?(ne=1-ne,E&&(ne-=E/y)):k==="mirror"&&(O=u)),P=Zn(0,1,ne)*y}const j=R?{done:!1,value:f[0]}:O.next(P);d&&(j.value=d(j.value));let{done:V}=j;!R&&p!==null&&(V=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return q&&o!==void 0&&(j.value=gu(f,this.options,o)),x&&x(j.value),q&&this.finish(),j}get duration(){const{resolved:e}=this;return e?Jn(e.calculatedDuration):0}get time(){return Jn(this.currentTime)}set time(e){e=Yn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Jn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=ND,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const MD=new Set(["opacity","clipPath","filter","transform"]);function ID(t,e,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeInOut",times:f}={}){const p={[e]:n};f&&(p.offset=f);const g=vS(d,o);return Array.isArray(g)&&(p.easing=g),t.animate(p,{delay:s,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"})}const FD=hh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tu=10,jD=2e4;function BD(t){return kh(t.type)||t.type==="spring"||!yS(t.ease)}function UD(t,e){const n=new Vh({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const o=[];let l=0;for(;!s.done&&lthis.onKeyframesResolved(u,d),n,s,o),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:o,ease:l,type:u,motionValue:d,name:f,startTime:p}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&Jl()&&VD(l)&&(l=ZS[l]),BD(this.options)){const{onComplete:y,onUpdate:w,motionValue:b,element:k,...E}=this.options,x=UD(e,E);e=x.keyframes,e.length===1&&(e[1]=e[0]),s=x.duration,o=x.times,l=x.ease,u="keyframes"}const g=ID(d.owner.current,f,e,{...this.options,duration:s,times:o,ease:l});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(gv(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:y}=this.options;d.set(gu(e,this.options,n)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:s,times:o,type:u,ease:l,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Jn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Jn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Yn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Ht;const{animation:s}=n;gv(s,e)}return Ht}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:o,type:l,ease:u,times:d}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:g,onComplete:y,element:w,...b}=this.options,k=new Vh({...b,keyframes:s,duration:o,type:l,ease:u,times:d,isGenerator:!0}),E=Yn(this.time);p.setWithVelocity(k.sample(E-tu).value,k.sample(E).value,tu)}const{onStop:f}=this.options;f&&f(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:o,repeatType:l,damping:u,type:d}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=n.owner.getProps();return FD()&&s&&MD.has(s)&&!f&&!p&&!o&&l!=="mirror"&&u!==0&&d!=="inertia"}}const zD={type:"spring",stiffness:500,damping:25,restSpeed:10},$D=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),WD={type:"keyframes",duration:.8},HD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qD=(t,{keyframes:e})=>e.length>2?WD:Rs.has(t)?t.startsWith("scale")?$D(e[1]):zD:HD;function KD({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:u,repeatDelay:d,from:f,elapsed:p,...g}){return!!Object.keys(g).length}const zh=(t,e,n,s={},o,l)=>u=>{const d=Ph(s,t)||{},f=d.delay||s.delay||0;let{elapsed:p=0}=s;p=p-Yn(f);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...d,delay:-p,onUpdate:w=>{e.set(w),d.onUpdate&&d.onUpdate(w)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:t,motionValue:e,element:l?void 0:o};KD(d)||(g={...g,...qD(t,g)}),g.duration&&(g.duration=Yn(g.duration)),g.repeatDelay&&(g.repeatDelay=Yn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(y=!0)),y&&!l&&e.get()!==void 0){const w=gu(g.keyframes,d);if(w!==void 0)return ze.update(()=>{g.onUpdate(w),g.onComplete()}),new fN([])}return!l&&Nv.supports(g)?new Nv(g):new Vh(g)};function QD({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function e1(t,e,{delay:n=0,transitionOverride:s,type:o}={}){var l;let{transition:u=t.getDefaultTransition(),transitionEnd:d,...f}=e;s&&(u=s);const p=[],g=o&&t.animationState&&t.animationState.getState()[o];for(const y in f){const w=t.getValue(y,(l=t.latestValues[y])!==null&&l!==void 0?l:null),b=f[y];if(b===void 0||g&&QD(g,y))continue;const k={delay:n,...Ph(u||{},y)};let E=!1;if(window.MotionHandoffAnimation){const S=TS(t);if(S){const R=window.MotionHandoffAnimation(S,y,ze);R!==null&&(k.startTime=R,E=!0)}}Ef(t,y),w.start(zh(y,w,b,t.shouldReduceMotion&&ES.has(y)?{type:!1}:k,t,E));const x=w.animation;x&&p.push(x)}return d&&Promise.all(p).then(()=>{ze.update(()=>{d&&CN(t,d)})}),p}function Rf(t,e,n={}){var s;const o=mu(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:l=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(l=n.transitionOverride);const u=o?()=>Promise.all(e1(t,o,n)):()=>Promise.resolve(),d=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:w}=l;return GD(t,e,g+p,y,w,n)}:()=>Promise.resolve(),{when:f}=l;if(f){const[p,g]=f==="beforeChildren"?[u,d]:[d,u];return p().then(()=>g())}else return Promise.all([u(),d(n.delay)])}function GD(t,e,n=0,s=0,o=1,l){const u=[],d=(t.variantChildren.size-1)*s,f=o===1?(p=0)=>p*s:(p=0)=>d-p*s;return Array.from(t.variantChildren).sort(XD).forEach((p,g)=>{p.notify("AnimationStart",e),u.push(Rf(p,e,{...l,delay:n+f(g)}).then(()=>p.notify("AnimationComplete",e)))}),Promise.all(u)}function XD(t,e){return t.sortNodePosition(e)}function YD(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const o=e.map(l=>Rf(t,l,n));s=Promise.all(o)}else if(typeof e=="string")s=Rf(t,e,n);else{const o=typeof e=="function"?mu(t,e,n.custom):e;s=Promise.all(e1(t,o,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const JD=mh.length;function t1(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?t1(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>YD(t,n,s)))}function nL(t){let e=tL(t),n=Dv(),s=!0;const o=f=>(p,g)=>{var y;const w=mu(t,g,f==="exit"?(y=t.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(w){const{transition:b,transitionEnd:k,...E}=w;p={...p,...E,...k}}return p};function l(f){e=f(t)}function u(f){const{props:p}=t,g=t1(t.parent)||{},y=[],w=new Set;let b={},k=1/0;for(let x=0;xk&&O,Y=!1;const ne=Array.isArray(P)?P:[P];let ve=ne.reduce(o(S),{});j===!1&&(ve={});const{prevResolvedValues:Ce={}}=R,Se={...Ce,...ve},Z=ce=>{B=!0,w.has(ce)&&(Y=!0,w.delete(ce)),R.needsAnimating[ce]=!0;const Q=t.getValue(ce);Q&&(Q.liveStyle=!1)};for(const ce in Se){const Q=ve[ce],se=Ce[ce];if(b.hasOwnProperty(ce))continue;let z=!1;wf(Q)&&wf(se)?z=!pS(Q,se):z=Q!==se,z?Q!=null?Z(ce):w.add(ce):Q!==void 0&&w.has(ce)?Z(ce):R.protectedKeys[ce]=!0}R.prevProp=P,R.prevResolvedValues=ve,R.isActive&&(b={...b,...ve}),s&&t.blockInitialAnimation&&(B=!1),B&&(!(V&&q)||Y)&&y.push(...ne.map(ce=>({animation:ce,options:{type:S}})))}if(w.size){const x={};w.forEach(S=>{const R=t.getBaseTarget(S),P=t.getValue(S);P&&(P.liveStyle=!0),x[S]=R??null}),y.push({animation:x})}let E=!!y.length;return s&&(p.initial===!1||p.initial===p.animate)&&!t.manuallyAnimateOnMount&&(E=!1),s=!1,E?e(y):Promise.resolve()}function d(f,p){var g;if(n[f].isActive===p)return Promise.resolve();(g=t.variantChildren)===null||g===void 0||g.forEach(w=>{var b;return(b=w.animationState)===null||b===void 0?void 0:b.setActive(f,p)}),n[f].isActive=p;const y=u(f);for(const w in n)n[w].protectedKeys={};return y}return{animateChanges:u,setActive:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=Dv(),s=!0}}}function rL(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!pS(e,t):!1}function ss(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Dv(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}class zr{constructor(e){this.isMounted=!1,this.node=e}update(){}}class sL extends zr{constructor(e){super(e),e.animationState||(e.animationState=nL(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();hu(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let iL=0;class oL extends zr{constructor(){super(...arguments),this.id=iL++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const aL={animation:{Feature:sL},exit:{Feature:oL}};function Wo(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function aa(t){return{point:{x:t.pageX,y:t.pageY}}}const lL=t=>e=>Ah(e)&&t(e,aa(e));function Do(t,e,n,s){return Wo(t,e,lL(n),s)}const Lv=(t,e)=>Math.abs(t-e);function uL(t,e){const n=Lv(t.x,e.x),s=Lv(t.y,e.y);return Math.sqrt(n**2+s**2)}class n1{constructor(e,n,{transformPagePoint:s,contextWindow:o,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Dd(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=uL(y.offset,{x:0,y:0})>=3;if(!w&&!b)return;const{point:k}=y,{timestamp:E}=mt;this.history.push({...k,timestamp:E});const{onStart:x,onMove:S}=this.handlers;w||(x&&x(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,y)},this.handlePointerMove=(y,w)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Nd(w,this.transformPagePoint),ze.update(this.updatePoint,!0)},this.handlePointerUp=(y,w)=>{this.end();const{onEnd:b,onSessionEnd:k,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Dd(y.type==="pointercancel"?this.lastMoveEventInfo:Nd(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(y,x),k&&k(y,x)},!Ah(e))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.contextWindow=o||window;const u=aa(e),d=Nd(u,this.transformPagePoint),{point:f}=d,{timestamp:p}=mt;this.history=[{...f,timestamp:p}];const{onSessionStart:g}=n;g&&g(e,Dd(d,this.history)),this.removeListeners=oa(Do(this.contextWindow,"pointermove",this.handlePointerMove),Do(this.contextWindow,"pointerup",this.handlePointerUp),Do(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Fr(this.updatePoint)}}function Nd(t,e){return e?{point:e(t.point)}:t}function Mv(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Dd({point:t},e){return{point:t,delta:Mv(t,r1(e)),offset:Mv(t,cL(e)),velocity:dL(e,.1)}}function cL(t){return t[0]}function r1(t){return t[t.length-1]}function dL(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=r1(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>Yn(e)));)n--;if(!s)return{x:0,y:0};const l=Jn(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const s1=1e-4,fL=1-s1,hL=1+s1,i1=.01,pL=0-i1,mL=0+i1;function qt(t){return t.max-t.min}function gL(t,e,n){return Math.abs(t-e)<=n}function Iv(t,e,n,s=.5){t.origin=s,t.originPoint=qe(e.min,e.max,t.origin),t.scale=qt(n)/qt(e),t.translate=qe(n.min,n.max,t.origin)-t.originPoint,(t.scale>=fL&&t.scale<=hL||isNaN(t.scale))&&(t.scale=1),(t.translate>=pL&&t.translate<=mL||isNaN(t.translate))&&(t.translate=0)}function Lo(t,e,n,s){Iv(t.x,e.x,n.x,s?s.originX:void 0),Iv(t.y,e.y,n.y,s?s.originY:void 0)}function Fv(t,e,n){t.min=n.min+e.min,t.max=t.min+qt(e)}function yL(t,e,n){Fv(t.x,e.x,n.x),Fv(t.y,e.y,n.y)}function jv(t,e,n){t.min=e.min-n.min,t.max=t.min+qt(e)}function Mo(t,e,n){jv(t.x,e.x,n.x),jv(t.y,e.y,n.y)}function vL(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?qe(n,t,s.max):Math.min(t,n)),t}function Bv(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function wL(t,{top:e,left:n,bottom:s,right:o}){return{x:Bv(t.x,n,o),y:Bv(t.y,e,s)}}function Uv(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=Ei(e.min,e.max-s,t.min):s>o&&(n=Ei(t.min,t.max-o,e.min)),Zn(0,1,n)}function EL(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Af=.35;function bL(t=Af){return t===!1?t=0:t===!0&&(t=Af),{x:Vv(t,"left","right"),y:Vv(t,"top","bottom")}}function Vv(t,e,n){return{min:zv(t,e),max:zv(t,n)}}function zv(t,e){return typeof t=="number"?t:t[e]||0}const $v=()=>({translate:0,scale:1,origin:0,originPoint:0}),si=()=>({x:$v(),y:$v()}),Wv=()=>({min:0,max:0}),Je=()=>({x:Wv(),y:Wv()});function rn(t){return[t("x"),t("y")]}function o1({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function TL({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function _L(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ld(t){return t===void 0||t===1}function Of({scale:t,scaleX:e,scaleY:n}){return!Ld(t)||!Ld(e)||!Ld(n)}function os(t){return Of(t)||a1(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function a1(t){return Hv(t.x)||Hv(t.y)}function Hv(t){return t&&t!=="0%"}function nu(t,e,n){const s=t-n,o=e*s;return n+o}function qv(t,e,n,s,o){return o!==void 0&&(t=nu(t,o,s)),nu(t,n,s)+e}function Nf(t,e=0,n=1,s,o){t.min=qv(t.min,e,n,s,o),t.max=qv(t.max,e,n,s,o)}function l1(t,{x:e,y:n}){Nf(t.x,e.translate,e.scale,e.originPoint),Nf(t.y,n.translate,n.scale,n.originPoint)}const Kv=.999999999999,Qv=1.0000000000001;function CL(t,e,n,s=!1){const o=n.length;if(!o)return;e.x=e.y=1;let l,u;for(let d=0;dKv&&(e.x=1),e.yKv&&(e.y=1)}function ii(t,e){t.min=t.min+e,t.max=t.max+e}function Gv(t,e,n,s,o=.5){const l=qe(t.min,t.max,o);Nf(t,e,n,l,s)}function oi(t,e){Gv(t.x,e.x,e.scaleX,e.scale,e.originX),Gv(t.y,e.y,e.scaleY,e.scale,e.originY)}function u1(t,e){return o1(_L(t.getBoundingClientRect(),e))}function PL(t,e,n){const s=u1(t,n),{scroll:o}=e;return o&&(ii(s.x,o.offset.x),ii(s.y,o.offset.y)),s}const c1=({current:t})=>t?t.ownerDocument.defaultView:null,kL=new WeakMap;class RL{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=g=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(aa(g).point)},l=(g,y)=>{const{drag:w,dragPropagation:b,onDragStart:k}=this.getProps();if(w&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=SN(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rn(x=>{let S=this.getAxisMotionValue(x).get()||0;if(Nn.test(S)){const{projection:R}=this.visualElement;if(R&&R.layout){const P=R.layout.layoutBox[x];P&&(S=qt(P)*(parseFloat(S)/100))}}this.originPoint[x]=S}),k&&ze.postRender(()=>k(g,y)),Ef(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},u=(g,y)=>{const{dragPropagation:w,dragDirectionLock:b,onDirectionLock:k,onDrag:E}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:x}=y;if(b&&this.currentDirection===null){this.currentDirection=AL(x),this.currentDirection!==null&&k&&k(this.currentDirection);return}this.updateAxis("x",y.point,x),this.updateAxis("y",y.point,x),this.visualElement.render(),E&&E(g,y)},d=(g,y)=>this.stop(g,y),f=()=>rn(g=>{var y;return this.getAnimationState(g)==="paused"&&((y=this.getAxisMotionValue(g).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new n1(e,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:c1(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&ze.postRender(()=>l(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:o}=this.getProps();if(!s||!Rl(e,o,this.currentDirection))return;const l=this.getAxisMotionValue(e);let u=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(u=vL(u,this.constraints[e],this.elastic[e])),l.set(u)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,l=this.constraints;n&&ni(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=wL(o.layoutBox,n):this.constraints=!1,this.elastic=bL(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&rn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=EL(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ni(e))return!1;const s=e.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=PL(s,o.root,this.visualElement.getTransformPagePoint());let u=xL(o.layout.layoutBox,l);if(n){const d=n(TL(u));this.hasMutatedConstraints=!!d,d&&(u=o1(d))}return u}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},p=rn(g=>{if(!Rl(g,n,this.currentDirection))return;let y=f&&f[g]||{};u&&(y={min:0,max:0});const w=o?200:1e6,b=o?40:1e7,k={type:"inertia",velocity:s?e[g]:0,bounceStiffness:w,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,k)});return Promise.all(p).then(d)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ef(this.visualElement,e),s.start(zh(e,s,0,n,this.visualElement,!1))}stopAnimation(){rn(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rn(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),o=s[n];return o||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){rn(n=>{const{drag:s}=this.getProps();if(!Rl(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:u,max:d}=o.layout.layoutBox[n];l.set(e[n]-qe(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ni(n)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};rn(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const f=d.get();o[u]=SL({min:f,max:f},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),rn(u=>{if(!Rl(u,e,null))return;const d=this.getAxisMotionValue(u),{min:f,max:p}=this.constraints[u];d.set(qe(f,p,o[u]))})}addListeners(){if(!this.visualElement.current)return;kL.set(this.visualElement,this);const e=this.visualElement.current,n=Do(e,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(f)}),s=()=>{const{dragConstraints:f}=this.getProps();ni(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ze.read(s);const u=Wo(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(rn(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=f[g].translate,y.set(y.get()+f[g].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),d&&d()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Af,dragMomentum:d=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function Rl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function AL(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class OL extends zr{constructor(e){super(e),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new RL(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const Xv=t=>(e,n)=>{t&&ze.postRender(()=>t(e,n))};class NL extends zr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(e){this.session=new n1(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:c1(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:Xv(e),onStart:Xv(n),onMove:s,onEnd:(l,u)=>{delete this.session,o&&ze.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=Do(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const xo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const n=Yv(t,e.target.x),s=Yv(t,e.target.y);return`${n}% ${s}%`}},DL={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=jr.parse(t);if(o.length>5)return s;const l=jr.createTransformer(t),u=typeof o[0]!="number"?1:0,d=n.x.scale*e.x,f=n.y.scale*e.y;o[0+u]/=d,o[1+u]/=f;const p=qe(d,f,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),l(o)}};class LL extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=e;eN(ML),l&&(n.group&&n.group.add(l),s&&s.register&&o&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Vl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:o,isPresent:l}=this.props,u=s.projection;return u&&(u.isPresent=l,o||e.layoutDependency!==n||n===void 0?u.willUpdate():this.safeToRemove(),e.isPresent!==l&&(l?u.promote():u.relegate()||ze.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),yh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function d1(t){const[e,n]=mO(),s=T.useContext(Kx);return C.jsx(LL,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(tS),isPresent:e,safeToRemove:n})}const ML={borderRadius:{...xo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xo,borderTopRightRadius:xo,borderBottomLeftRadius:xo,borderBottomRightRadius:xo,boxShadow:DL};function IL(t,e,n){const s=_t(t)?t:zo(t);return s.start(zh("",s,e,n)),s.animation}function FL(t){return t instanceof SVGElement&&t.tagName!=="svg"}const jL=(t,e)=>t.depth-e.depth;class BL{constructor(){this.children=[],this.isDirty=!1}add(e){Oh(this.children,e),this.isDirty=!0}remove(e){Nh(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jL),this.isDirty=!1,this.children.forEach(e)}}function UL(t,e){const n=Dn.now(),s=({timestamp:o})=>{const l=o-n;l>=e&&(Fr(s),t(l-e))};return ze.read(s,!0),()=>Fr(s)}const f1=["TopLeft","TopRight","BottomLeft","BottomRight"],VL=f1.length,Jv=t=>typeof t=="string"?parseFloat(t):t,Zv=t=>typeof t=="number"||ye.test(t);function zL(t,e,n,s,o,l){o?(t.opacity=qe(0,n.opacity!==void 0?n.opacity:1,$L(s)),t.opacityExit=qe(e.opacity!==void 0?e.opacity:1,0,WL(s))):l&&(t.opacity=qe(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let u=0;use?1:n(Ei(t,e,s))}function t0(t,e){t.min=e.min,t.max=e.max}function nn(t,e){t0(t.x,e.x),t0(t.y,e.y)}function n0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function r0(t,e,n,s,o){return t-=e,t=nu(t,1/n,s),o!==void 0&&(t=nu(t,1/o,s)),t}function HL(t,e=0,n=1,s=.5,o,l=t,u=t){if(Nn.test(e)&&(e=parseFloat(e),e=qe(u.min,u.max,e/100)-u.min),typeof e!="number")return;let d=qe(l.min,l.max,s);t===l&&(d-=e),t.min=r0(t.min,e,n,d,o),t.max=r0(t.max,e,n,d,o)}function s0(t,e,[n,s,o],l,u){HL(t,e[n],e[s],e[o],e.scale,l,u)}const qL=["x","scaleX","originX"],KL=["y","scaleY","originY"];function i0(t,e,n,s){s0(t.x,e,qL,n?n.x:void 0,s?s.x:void 0),s0(t.y,e,KL,n?n.y:void 0,s?s.y:void 0)}function o0(t){return t.translate===0&&t.scale===1}function p1(t){return o0(t.x)&&o0(t.y)}function a0(t,e){return t.min===e.min&&t.max===e.max}function QL(t,e){return a0(t.x,e.x)&&a0(t.y,e.y)}function l0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function m1(t,e){return l0(t.x,e.x)&&l0(t.y,e.y)}function u0(t){return qt(t.x)/qt(t.y)}function c0(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class GL{constructor(){this.members=[]}add(e){Oh(this.members,e),e.scheduleRender()}remove(e){if(Nh(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function XL(t,e,n){let s="";const o=t.x.translate/e.x,l=t.y.translate/e.y,u=(n==null?void 0:n.z)||0;if((o||l||u)&&(s=`translate3d(${o}px, ${l}px, ${u}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:p,rotate:g,rotateX:y,rotateY:w,skewX:b,skewY:k}=n;p&&(s=`perspective(${p}px) ${s}`),g&&(s+=`rotate(${g}deg) `),y&&(s+=`rotateX(${y}deg) `),w&&(s+=`rotateY(${w}deg) `),b&&(s+=`skewX(${b}deg) `),k&&(s+=`skewY(${k}deg) `)}const d=t.x.scale*e.x,f=t.y.scale*e.y;return(d!==1||f!==1)&&(s+=`scale(${d}, ${f})`),s||"none"}const as={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ro=typeof window<"u"&&window.MotionDebug!==void 0,Md=["","X","Y","Z"],YL={visibility:"hidden"},d0=1e3;let JL=0;function Id(t,e,n,s){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function g1(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=TS(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ze,!(o||l))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&g1(s)}function y1({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},d=e==null?void 0:e()){this.id=JL++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ro&&(as.totalNodes=as.resolvedTargetDeltas=as.recalculatedProjection=0),this.nodes.forEach(tM),this.nodes.forEach(oM),this.nodes.forEach(aM),this.nodes.forEach(nM),Ro&&window.MotionDebug.record(as)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;fthis.root.updateBlockedByResize=!1;t(u,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=UL(w,250),Vl.hasAnimatedSinceResize&&(Vl.hasAnimatedSinceResize=!1,this.nodes.forEach(h0))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&g&&(f||p)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:w,hasRelativeTargetChanged:b,layout:k})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||g.getDefaultTransition()||fM,{onLayoutAnimationStart:x,onLayoutAnimationComplete:S}=g.getProps(),R=!this.targetLayout||!m1(this.targetLayout,k)||b,P=!w&&b;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||P||w&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,P);const O={...Ph(E,"layout"),onPlay:x,onComplete:S};(g.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else w||h0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=k})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Fr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(lM),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&g1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f{const j=O/1e3;p0(y.x,u.x,j),p0(y.y,u.y,j),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cM(this.relativeTarget,this.relativeTargetOrigin,w,j),P&&QL(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=Je()),nn(P,this.relativeTarget)),E&&(this.animationValues=g,zL(g,p,this.latestValues,j,R,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Fr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{Vl.hasAnimatedSinceResize=!0,this.currentAnimation=IL(0,d0,{...u,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(d0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:f,layout:p,latestValues:g}=u;if(!(!d||!f||!p)){if(this!==u&&this.layout&&p&&v1(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||Je();const y=qt(this.layout.layoutBox.x);f.x.min=u.target.x.min,f.x.max=f.x.min+y;const w=qt(this.layout.layoutBox.y);f.y.min=u.target.y.min,f.y.max=f.y.min+w}nn(d,f),oi(d,g),Lo(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new GL),this.sharedNodes.get(u).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:d}=this.options;return d?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:d}=this.options;return d?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:f}=u;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const p={};f.z&&Id("z",u,p,this.animationValues);for(let g=0;g{var d;return(d=u.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(f0),this.root.sharedNodes.clear()}}}function ZL(t){t.updateLayout()}function eM(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:l}=t.options,u=n.source!==t.layout.source;l==="size"?rn(y=>{const w=u?n.measuredBox[y]:n.layoutBox[y],b=qt(w);w.min=s[y].min,w.max=w.min+b}):v1(l,n.layoutBox,s)&&rn(y=>{const w=u?n.measuredBox[y]:n.layoutBox[y],b=qt(s[y]);w.max=w.min+b,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[y].max=t.relativeTarget[y].min+b)});const d=si();Lo(d,s,n.layoutBox);const f=si();u?Lo(f,t.applyTransform(o,!0),n.measuredBox):Lo(f,s,n.layoutBox);const p=!p1(d);let g=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:w,layout:b}=y;if(w&&b){const k=Je();Mo(k,n.layoutBox,w.layoutBox);const E=Je();Mo(E,s,b.layoutBox),m1(k,E)||(g=!0),y.options.layoutRoot&&(t.relativeTarget=E,t.relativeTargetOrigin=k,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:f,layoutDelta:d,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function tM(t){Ro&&as.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nM(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rM(t){t.clearSnapshot()}function f0(t){t.clearMeasurements()}function sM(t){t.isLayoutDirty=!1}function iM(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function h0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oM(t){t.resolveTargetDelta()}function aM(t){t.calcProjection()}function lM(t){t.resetSkewAndRotation()}function uM(t){t.removeLeadSnapshot()}function p0(t,e,n){t.translate=qe(e.translate,0,n),t.scale=qe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function m0(t,e,n,s){t.min=qe(e.min,n.min,s),t.max=qe(e.max,n.max,s)}function cM(t,e,n,s){m0(t.x,e.x,n.x,s),m0(t.y,e.y,n.y,s)}function dM(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const fM={duration:.45,ease:[.4,0,.1,1]},g0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),y0=g0("applewebkit/")&&!g0("chrome/")?Math.round:Ht;function v0(t){t.min=y0(t.min),t.max=y0(t.max)}function hM(t){v0(t.x),v0(t.y)}function v1(t,e,n){return t==="position"||t==="preserve-aspect"&&!gL(u0(e),u0(n),.2)}function pM(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const mM=y1({attachResizeListener:(t,e)=>Wo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fd={current:void 0},w1=y1({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Fd.current){const t=new mM({});t.mount(window),t.setOptions({layoutScroll:!0}),Fd.current=t}return Fd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),gM={pan:{Feature:NL},drag:{Feature:OL,ProjectionNode:w1,MeasureLayout:d1}};function w0(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=s[o];l&&ze.postRender(()=>l(e,aa(e)))}class yM extends zr{mount(){const{current:e}=this.node;e&&(this.unmount=gN(e,n=>(w0(this.node,n,"Start"),s=>w0(this.node,s,"End"))))}unmount(){}}class vM extends zr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oa(Wo(this.node.current,"focus",()=>this.onFocus()),Wo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function x0(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),l=s[o];l&&ze.postRender(()=>l(e,aa(e)))}class wM extends zr{mount(){const{current:e}=this.node;e&&(this.unmount=xN(e,n=>(x0(this.node,n,"Start"),(s,{success:o})=>x0(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Df=new WeakMap,jd=new WeakMap,xM=t=>{const e=Df.get(t.target);e&&e(t)},SM=t=>{t.forEach(xM)};function EM({root:t,...e}){const n=t||document;jd.has(n)||jd.set(n,{});const s=jd.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(SM,{root:t,...e})),s[o]}function bM(t,e,n){const s=EM(e);return Df.set(t,n),s.observe(t),()=>{Df.delete(t),s.unobserve(t)}}const TM={some:0,all:1};class _M extends zr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:o="some",once:l}=e,u={root:n?n.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:TM[o]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),w=p?g:y;w&&w(f)};return bM(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(CM(e,n))&&this.startObserver()}unmount(){}}function CM({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const PM={inView:{Feature:_M},tap:{Feature:wM},focus:{Feature:vM},hover:{Feature:yM}},kM={layout:{ProjectionNode:w1,MeasureLayout:d1}},Lf={current:null},x1={current:!1};function RM(){if(x1.current=!0,!!fh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Lf.current=t.matches;t.addListener(e),e()}else Lf.current=!1}const AM=[...HS,Tt,jr],OM=t=>AM.find(WS(t)),S0=new WeakMap;function NM(t,e,n){for(const s in e){const o=e[s],l=n[s];if(_t(o))t.addValue(s,o);else if(_t(l))t.addValue(s,zo(o,{owner:t}));else if(l!==o)if(t.hasValue(s)){const u=t.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=t.getStaticValue(s);t.addValue(s,zo(u!==void 0?u:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const E0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DM{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:l,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Bh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=Dn.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),x1.current||RM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Lf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){S0.delete(this.current),this.projection&&this.projection.unmount(),Fr(this.notifyUpdate),Fr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Rs.has(e),o=n.on("change",d=>{this.latestValues[e]=d,this.props.onUpdate&&ze.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),l=n.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),l(),u&&u(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in bi){const n=bi[e];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[e]&&o&&s(this.props)&&(this.features[e]=new o(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=zo(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(zS(o)||DS(o))?o=parseFloat(o):!OM(o)&&jr.test(n)&&(o=BS(e,n)),this.setBaseTarget(e,_t(o)?o.get():o)),_t(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const u=wh(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);u&&(o=u[e])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,e);return l!==void 0&&!_t(l)?l:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Dh),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class S1 extends DM{constructor(){super(...arguments),this.KeyframeResolver=qS}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_t(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LM(t){return window.getComputedStyle(t)}class MM extends S1{constructor(){super(...arguments),this.type="html",this.renderInstance=lS}readValueFromInstance(e,n){if(Rs.has(n)){const s=jh(n);return s&&s.default||0}else{const s=LM(e),o=(iS(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return u1(e,n)}build(e,n,s){Eh(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ch(e,n,s)}}class IM extends S1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Rs.has(n)){const s=jh(n);return s&&s.default||0}return n=uS.has(n)?n:gh(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return fS(e,n,s)}build(e,n,s){bh(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,o){cS(e,n,s,o)}mount(e){this.isSVGTag=_h(e.tagName),super.mount(e)}}const FM=(t,e)=>vh(t)?new IM(e):new MM(e,{allowProjection:t!==T.Fragment}),jM=uN({...aL,...PM,...gM,...kM},FM),Br=TO(jM);function BM(t){const[e,n]=T.useState(null);return T.useLayoutEffect(()=>{const s=t.current;if(!s)return;const o=s.getBoundingClientRect();n({width:o.width,height:o.height});const l=new ResizeObserver(([u])=>{const{width:d,height:f}=u.contentRect;n({width:d,height:f})});return l.observe(s),()=>l.disconnect()},[t]),e}const UM={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},VM=1024,Kn={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},zM=[1,2,3],$M=6e3;function WM(t){try{const e=new URL(t);if(e.protocol!=="https:"||e.username||e.password||e.port&&e.port!=="443")return null;const n=UM[e.hostname];if(!n)return null;const s=e.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),o=s?s[1]:e.pathname,l=o.split("/").pop();return!o.startsWith(n)||!l||!/\.[a-z0-9]+$/i.test(l)||/\.svg$/i.test(l)?null:{baseUrl:`${e.origin}${o}`,filename:l}}catch{return null}}const b0=t=>Math.min(Math.max(Math.round(t),1),$M),T0=t=>Math.min(1,Math.max(0,t));function Mf({baseUrl:t,filename:e},{width:n,height:s,crop:o,focalPoint:l,quality:u}){const d=[`w_${b0(n)}`,`h_${b0(s||n)}`];o&&d.push(l?`fp_${T0(l.x).toFixed(2)}_${T0(l.y).toFixed(2)}`:"al_c"),d.push(`q_${u}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const f=/\.gif$/i.test(e)?e:e.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${t}/v1/${o?"fill":"fit"}/${d.join(",")}/${f}`}function HM(t,e){return zM.map(n=>`${Mf(t,{...e,width:e.width*n,height:e.height?e.height*n:void 0})} ${n}x`).join(", ")}function qM(t,e){return(e==null?void 0:e.baseUrl)||t}function KM(t){return t===Kn.OPTIMIZED?Kn.ORIGINAL:Kn.FALLBACK}const Bd="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",E1=T.forwardRef(({aspectRatio:t,className:e,style:n,children:s},o)=>C.jsx("span",{ref:o,className:Vr("inline-block relative",e),style:{aspectRatio:t,...n},children:s}));E1.displayName="ImageWrapper";const b1=T.forwardRef(({parsed:t,fittingType:e,focalPoint:n,quality:s,className:o,style:l,aspectRatio:u,onLoad:d,...f},p)=>{const g=T.useRef(null),y=T.useRef(null),w=BM(g),[b,k]=T.useState(!1);T.useImperativeHandle(p,()=>y.current),T.useEffect(()=>{k(!1)},[t.baseUrl]);const E=e!=="fit",x=w&&{width:w.width||VM,height:w.height?w.height:void 0,crop:E,focalPoint:E?n:void 0,quality:s};return C.jsxs(E1,{ref:g,aspectRatio:u,className:o,style:l,children:[x&&!b&&C.jsx("img",{src:Mf(t,{...x,width:20,height:x.height?Math.max(1,Math.round(20*x.height/x.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:e==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),x&&C.jsx("img",{ref:y,src:Mf(t,x),srcSet:HM(t,x),loading:"lazy",className:Vr("w-full h-full inset-0 absolute",e==="fit"?"object-contain":"object-cover"),onLoad:S=>{k(!0),d==null||d(S)},...f})]})});b1.displayName="ResponsiveImage";const $h=T.forwardRef(({src:t,fittingType:e="fill",originWidth:n,originHeight:s,focalPointX:o,focalPointY:l,quality:u=90,onError:d,...f},p)=>{const g=t&&t!==Bd?WM(t):null,y=g?Kn.OPTIMIZED:Kn.ORIGINAL,[w,b]=T.useState({src:t,mode:y}),k=w.src===t?w.mode:y;T.useEffect(()=>{b({src:t,mode:y})},[t,y]);const x={...f,onError:O=>{if(k===Kn.FALLBACK)return;const j=KM(k);b({src:t,mode:j}),j===Kn.FALLBACK&&(d==null||d(O))}};if(!t)return C.jsx("img",{ref:p,src:Bd,...x,"data-empty-image":!0});const S=k===Kn.OPTIMIZED?g:null;if(!S){const O=k===Kn.FALLBACK,j=O?Bd:qM(t,g);return C.jsx("img",{ref:p,src:j,...x,"data-error-image":O||void 0})}const R=typeof o=="number"&&typeof l=="number"?{x:o,y:l}:void 0,P=n&&s?`${n} / ${s}`:void 0;return C.jsx(b1,{ref:p,parsed:S,fittingType:e,focalPoint:R,quality:u,aspectRatio:P,...x})});$h.displayName="Image";const _0="https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/2016449ab_generated_417f2718.png";function QM(){return C.jsxs("section",{className:"relative w-full overflow-hidden h-[460px] md:h-[520px] lg:h-[560px]",style:{marginTop:80},"aria-label":"Executive Management introduction",children:[C.jsxs("div",{className:"absolute inset-0",children:[C.jsx($h,{src:_0,alt:"Doha West Bay skyline at golden hour",className:"w-full h-full",fittingType:"fill"}),C.jsx("video",{className:"absolute inset-0 w-full h-full object-cover",poster:_0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,preload:"metadata","aria-hidden":"true"}),C.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(90deg, rgba(80,0,29,0.82) 0%, rgba(80,0,29,0.62) 42%, rgba(80,0,29,0.25) 100%)"}})]}),C.jsx("div",{className:"relative h-full mx-auto flex flex-col justify-center px-5 md:px-10 lg:px-16",style:{maxWidth:1440},children:C.jsxs(Br.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.6,ease:"easeOut"},className:"w-full lg:max-w-[55%]",children:[C.jsxs("nav",{className:"flex items-center gap-2 text-[11px] font-medium tracking-[0.14em] uppercase mb-6",style:{color:"rgba(255,255,255,0.7)"},children:[C.jsx("span",{children:"Home"}),C.jsx("span",{style:{color:"rgba(255,255,255,0.4)"},children:"/"}),C.jsx("span",{children:"About Us"}),C.jsx("span",{style:{color:"rgba(255,255,255,0.4)"},children:"/"}),C.jsx("span",{children:"Leadership"}),C.jsx("span",{style:{color:"rgba(255,255,255,0.4)"},children:"/"}),C.jsx("span",{style:{color:"#FFFFFF"},children:"Executive Management"})]}),C.jsx("p",{className:"text-[12px] font-semibold tracking-[0.16em] uppercase mb-5",style:{color:"#F1E1E7"},children:"About Alrazah"}),C.jsx("h1",{className:"font-heading text-white mb-6",style:{fontSize:"clamp(38px, 6vw, 68px)",fontWeight:500,letterSpacing:"0.02em",lineHeight:1.05},children:"Executive Management"}),C.jsx("p",{className:"text-white/90 mb-9 max-w-[560px]",style:{fontSize:18,lineHeight:1.7,fontWeight:400},children:"Leadership focused on disciplined execution, operational excellence and long-term value creation across Alrazah Holding and its diversified portfolio of businesses."}),C.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[C.jsxs("a",{href:"#directory",className:"inline-flex items-center gap-2 transition-colors duration-200",style:{background:"#FFFFFF",color:"#8D0034",padding:"14px 26px",fontSize:13,fontWeight:600,letterSpacing:"0.08em"},children:["MEET OUR LEADERSHIP",C.jsx(Yo,{size:15,strokeWidth:2})]}),C.jsx("a",{href:"/about-us/leadership/board-of-directors",className:"inline-flex items-center transition-colors duration-200",style:{border:"1px solid rgba(255,255,255,0.6)",color:"#FFFFFF",padding:"13px 26px",fontSize:13,fontWeight:600,letterSpacing:"0.08em"},children:"VIEW BOARD OF DIRECTORS"})]})]})})]})}function GM(){return C.jsx("section",{className:"w-full",style:{background:"#F1EEEA",paddingTop:96,paddingBottom:96},children:C.jsxs("div",{className:"mx-auto grid grid-cols-12 gap-8 px-5 md:px-10 lg:px-16",style:{maxWidth:1440},children:[C.jsxs(Br.div,{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,ease:"easeOut"},className:"col-span-12 md:col-span-4",children:[C.jsx("p",{className:"text-[12px] font-bold tracking-[0.14em] uppercase mb-6",style:{color:"#8D0034"},children:"Leadership & Execution"}),C.jsx("h2",{className:"font-heading",style:{fontSize:"clamp(28px, 4vw, 44px)",fontWeight:500,lineHeight:1.15,letterSpacing:"-0.01em",color:"#1B1B1B"},children:"Experienced leadership. Disciplined execution. Long-term perspective."})]}),C.jsxs(Br.div,{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,ease:"easeOut",delay:.08},className:"col-span-12 md:col-span-7 md:col-start-6 flex flex-col gap-6",children:[C.jsx("p",{style:{fontSize:16,lineHeight:1.8,color:"#333333"},children:"Alrazah's Executive Management team is responsible for translating the Group's strategic direction into disciplined execution across its businesses, investments and operating platforms."}),C.jsx("p",{style:{fontSize:16,lineHeight:1.8,color:"#333333"},children:"Combining sector expertise, regional knowledge and international perspective, the leadership team works across the Group to strengthen performance, develop businesses, manage risk and identify opportunities for sustainable growth."}),C.jsx("p",{style:{fontSize:16,lineHeight:1.8,color:"#333333"},children:"Together, the team supports Alrazah's ambition to build enduring businesses and partnerships that contribute to Qatar's economic development while creating long-term value for shareholders and stakeholders."})]})]})})}function XM({executive:t,last:e}){return C.jsxs(Br.article,{initial:{opacity:0,y:18},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5,ease:"easeOut"},className:"grid grid-cols-12 gap-8 group",style:{paddingTop:64,paddingBottom:64},children:[C.jsx("div",{className:"col-span-12 md:col-span-3",children:C.jsx("div",{className:"overflow-hidden",style:{border:"1px solid rgba(0,0,0,0.05)"},children:C.jsx("div",{style:{aspectRatio:"4 / 5",width:"100%"},children:C.jsx($h,{src:t.image,alt:`${t.name} — ${t.position}`,className:"w-full h-full transition-[filter] duration-300 group-hover:brightness-105",fittingType:"fill"})})})}),C.jsxs("div",{className:"col-span-12 md:col-span-8 md:col-start-5 flex flex-col",children:[C.jsx("h3",{className:"font-heading transition-colors duration-200 group-hover:text-[#8D0034]",style:{fontSize:31,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"#161616",lineHeight:1.2},children:t.name}),C.jsx("p",{className:"mt-3",style:{fontSize:17,fontWeight:400,color:"#8D0034"},children:t.position}),C.jsx("div",{className:"mt-[18px] mb-7",style:{borderTop:"1px solid #D6D1CD",width:"100%"}}),C.jsx("div",{className:"flex flex-col gap-5 max-w-[820px]",children:t.bio.map((n,s)=>C.jsx("p",{style:{fontSize:16,lineHeight:1.8,color:"#333333"},children:n},s))}),t.slug&&C.jsxs("a",{href:`/about-us/leadership/executive-management/${t.slug}`,className:"mt-8 inline-flex items-center gap-2 self-start text-[13px] font-semibold tracking-[0.08em] uppercase transition-colors duration-200",style:{color:"#1B1B1B"},children:["Full Profile",C.jsx(Yo,{size:14,strokeWidth:2,className:"transition-transform duration-200 group-hover:translate-x-1"})]})]}),!e&&C.jsx("div",{className:"col-span-12",style:{borderTop:"1px solid #DED9D5"}})]})}const C0=[{name:"Faisal Hamad T M Al-Thani",position:"Chief Executive Officer",image:"https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/99a0bbcd5_generated_269a81f0.png",slug:"faisal-hamad-al-thani",bio:["Faisal Hamad Al-Thani serves as Chief Executive Officer of Alrazah Holding, with responsibility for the Group's overall strategic direction, operational performance and long-term growth agenda across its diversified businesses and investment platforms.","With more than two decades of leadership experience across investment, infrastructure and industrial sectors in Qatar and the wider Gulf region, he has played a central role in developing the Group's businesses, strengthening strategic partnerships and advancing Alrazah's position across regional and international markets.","In his current capacity, he oversees the execution of the Group's strategic priorities, with particular focus on disciplined capital allocation, business performance, governance and the development of operating platforms built for sustainable value creation."]},{name:"Abdullah Mohammed Al-Kuwari",position:"Deputy Group Managing Director",image:"https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/5be49bdf6_generated_609d9b92.png",slug:"abdullah-mohammed-al-kuwari",bio:["Abdullah Mohammed Al-Kuwari serves as Deputy Group Managing Director, supporting the Chief Executive Officer in delivering the Group's strategy and overseeing coordination across Alrazah's operating businesses and corporate functions.","His career spans senior leadership roles across real estate, financial services and diversified industrials, bringing deep regional market knowledge and a strong record of building and restructuring operating platforms.","He is responsible for driving cross-portfolio performance, operational discipline and the development of management capability across the Group's businesses, ensuring execution aligns with the Group's long-term strategic objectives."]},{name:"Sara Nasser Al-Sulaiti",position:"Chief Financial Officer",image:"https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/971286017_generated_09d4e3b8.png",slug:"sara-nasser-al-sulaiti",bio:["Sara Nasser Al-Sulaiti serves as Chief Financial Officer, responsible for the Group's financial strategy, capital structure, reporting integrity and treasury management across Alrazah Holding and its subsidiaries.","She brings extensive experience in corporate finance, investment analysis and financial governance, developed across leading regional and international financial institutions and holding companies.","She oversees capital allocation, financial risk management and the Group's reporting and controls framework, supporting disciplined investment decisions and long-term financial resilience across the portfolio."]},{name:"Khalid Abdulaziz Al-Misned",position:"Chief Operating Officer",image:"https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/f7f3c325c_generated_d3e4dc4d.png",slug:"khalid-abdulaziz-al-misned",bio:["Khalid Abdulaziz Al-Misned serves as Chief Operating Officer, with responsibility for operational performance, execution capability and the development of operating platforms across the Group's businesses.","His background combines senior operational leadership across industrial, infrastructure and services sectors, with a focus on operational excellence, performance management and large-scale programme delivery.","He leads the Group's operational agenda, working with business leaders to strengthen execution, embed performance discipline and build the operational infrastructure required to support sustainable growth."]},{name:"Mohammed Saud Al-Thani",position:"Chief Investment Officer",image:"https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/a31f39cef_generated_a28d8689.png",slug:"mohammed-saud-al-thani",bio:["Mohammed Saud Al-Thani serves as Chief Investment Officer, leading the Group's investment strategy, portfolio development and transaction execution across Qatar and international markets.","He brings deep experience in investment banking, private equity and direct investment, with a track record across infrastructure, energy, real assets and growth-stage platforms.","He is responsible for sourcing and executing investment opportunities, managing portfolio performance and supporting the Group's strategic partnerships and international expansion agenda."]},{name:"Lubna Rashid Al-Kaabi",position:"Chief Legal & Governance Officer",image:"https://media.base44.com/images/public/6a87b9774d371bbc8677cab7/1b8d3b0c6_generated_99e10b87.png",slug:"lubna-rashid-al-kaabi",bio:["Lubna Rashid Al-Kaabi serves as Chief Legal and Governance Officer, responsible for the Group's legal affairs, corporate governance, compliance and risk frameworks.","Her experience spans corporate law, regulatory affairs and governance across listed and private institutions in Qatar and the wider region, with particular expertise in structuring, compliance and board-level governance.","She oversees the Group's governance architecture, legal risk management and regulatory engagement, ensuring Alrazah operates to the highest institutional standards across all its businesses and jurisdictions."]}];function YM(){return C.jsx("section",{id:"directory",className:"w-full",style:{background:"#FFFFFF",paddingTop:88,paddingBottom:32},children:C.jsxs("div",{className:"mx-auto px-5 md:px-10 lg:px-16",style:{maxWidth:1440},children:[C.jsx("p",{className:"text-[12px] font-bold tracking-[0.14em] uppercase mb-4",style:{color:"#8D0034"},children:"Executive Management"}),C.jsx("h2",{className:"font-heading mb-16",style:{fontSize:"clamp(28px, 4vw, 46px)",fontWeight:500,lineHeight:1.15,letterSpacing:"-0.01em",color:"#1B1B1B"},children:"The leadership responsible for execution"}),C.jsx("div",{className:"flex flex-col",children:C0.map((t,e)=>C.jsx(XM,{executive:t,last:e===C0.length-1},t.slug))})]})})}function JM(){return C.jsx("section",{className:"w-full",style:{background:"#F1EEEA",paddingTop:96,paddingBottom:96},children:C.jsxs("div",{className:"mx-auto grid grid-cols-12 gap-8 px-5 md:px-10 lg:px-16",style:{maxWidth:1440},children:[C.jsxs(Br.div,{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,ease:"easeOut"},className:"col-span-12 md:col-span-4",children:[C.jsx("p",{className:"text-[12px] font-bold tracking-[0.14em] uppercase mb-6",style:{color:"#8D0034"},children:"Executing the Strategy"}),C.jsx("h2",{className:"font-heading",style:{fontSize:"clamp(26px, 3.5vw, 40px)",fontWeight:500,lineHeight:1.15,letterSpacing:"-0.01em",color:"#1B1B1B"},children:"From strategy to operational performance"})]}),C.jsxs(Br.div,{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,ease:"easeOut",delay:.08},className:"col-span-12 md:col-span-7 md:col-start-6 flex flex-col gap-6",children:[C.jsx("p",{style:{fontSize:16,lineHeight:1.8,color:"#333333"},children:"Alrazah's leadership model combines long-term strategic perspective with disciplined execution across a diversified portfolio of businesses and investments. Executive Management works across the Group to strengthen operating platforms, develop strategic partnerships and position the organization for sustainable growth."}),C.jsx("p",{style:{fontSize:16,lineHeight:1.8,color:"#333333"},children:"From Qatar-based operations to international investment opportunities, the Group's leadership team brings together regional knowledge and global perspective to support resilient businesses and long-term value creation."}),C.jsxs("a",{href:"/what-we-do",className:"inline-flex items-center gap-2 self-start mt-2 text-[13px] font-semibold tracking-[0.08em] uppercase transition-colors duration-200",style:{color:"#8D0034"},children:["Explore Our Businesses",C.jsx(Yo,{size:15,strokeWidth:2})]})]})]})})}const P0=[{label:"Board of Directors",desc:"Governance, oversight and stewardship of the Group.",path:"/about-us/leadership/board-of-directors"},{label:"Executive Management",desc:"Leadership responsible for execution and operational performance.",path:"/about-us/leadership/executive-management",active:!0},{label:"Corporate Governance",desc:"The frameworks, policies and standards that guide Alrazah.",path:"/about-us/governance"}];function ZM(){return C.jsx("section",{className:"w-full",style:{background:"#FFFFFF",paddingTop:88,paddingBottom:88},children:C.jsxs("div",{className:"mx-auto px-5 md:px-10 lg:px-16",style:{maxWidth:1440},children:[C.jsx("p",{className:"text-[12px] font-bold tracking-[0.14em] uppercase mb-4",style:{color:"#8D0034"},children:"Leadership & Governance"}),C.jsx("h2",{className:"font-heading mb-4 max-w-[720px]",style:{fontSize:"clamp(26px, 3.5vw, 42px)",fontWeight:500,lineHeight:1.15,letterSpacing:"-0.01em",color:"#1B1B1B"},children:"Leadership & Governance"}),C.jsx("p",{className:"max-w-[640px] mb-12",style:{fontSize:16,lineHeight:1.8,color:"#4A4A4A"},children:"Explore the governance structures and leadership teams responsible for Alrazah's strategic direction, oversight and execution."}),C.jsx("div",{className:"flex flex-col",children:P0.map((t,e)=>C.jsxs(Br.a,{href:t.path,initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.4,ease:"easeOut",delay:e*.05},className:"group grid grid-cols-12 gap-8 items-center transition-colors duration-200",style:{paddingTop:28,paddingBottom:28,borderTop:"1px solid #D6D1CD",borderBottom:e===P0.length-1?"1px solid #D6D1CD":"none"},children:[C.jsxs("div",{className:"col-span-12 md:col-span-5 flex items-center gap-4",children:[C.jsx("span",{className:"text-[11px] font-semibold tracking-[0.14em] uppercase",style:{color:"#8D0034",minWidth:28},children:String(e+1).padStart(2,"0")}),C.jsx("span",{className:"font-heading transition-colors duration-200 group-hover:text-[#8D0034]",style:{fontSize:22,fontWeight:600,letterSpacing:"0.04em",color:t.active?"#8D0034":"#1B1B1B"},children:t.label})]}),C.jsx("div",{className:"col-span-12 md:col-span-6",style:{fontSize:15,lineHeight:1.7,color:"#4A4A4A"},children:t.desc}),C.jsx("div",{className:"col-span-12 md:col-span-1 flex md:justify-end",children:C.jsx(Yo,{size:20,strokeWidth:1.75,className:"transition-transform duration-200 group-hover:translate-x-2",style:{color:"#8D0034"}})})]},t.label))})]})})}function e2(){return C.jsx("section",{className:"w-full",style:{background:"#8D0034",paddingTop:96,paddingBottom:96},children:C.jsxs(Br.div,{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.55,ease:"easeOut"},className:"mx-auto flex flex-col items-center text-center px-5 md:px-10 lg:px-16",style:{maxWidth:1440},children:[C.jsx("p",{className:"text-[12px] font-semibold tracking-[0.16em] uppercase mb-6",style:{color:"#F1E1E7"},children:"Alrazah Holding"}),C.jsx("h2",{className:"font-heading text-white max-w-[900px]",style:{fontSize:"clamp(28px, 4vw, 44px)",fontWeight:500,lineHeight:1.2,letterSpacing:"-0.01em"},children:"Building businesses. Strengthening partnerships. Creating long-term value."}),C.jsx("p",{className:"mt-6 max-w-[640px]",style:{fontSize:17,lineHeight:1.7,color:"rgba(255,255,255,0.85)"},children:"Discover the businesses, investment platforms and strategic capabilities that underpin Alrazah's diversified Group."}),C.jsxs("a",{href:"/what-we-do",className:"mt-10 inline-flex items-center gap-2 transition-colors duration-200",style:{background:"#FFFFFF",color:"#8D0034",padding:"15px 30px",fontSize:13,fontWeight:600,letterSpacing:"0.08em"},children:["EXPLORE WHAT WE DO",C.jsx(Yo,{size:15,strokeWidth:2})]})]})})}const t2=[{title:"About",links:["Overview","Leadership","Governance","Financial Results"]},{title:"What We Do",links:["Our Businesses","Investments","Sectors","Partnerships"]},{title:"Media",links:["News","Press Releases","Events","Publications"]}];function n2(){return C.jsx("footer",{style:{background:"#430019",color:"#EDEAE6"},children:C.jsxs("div",{className:"mx-auto px-5 md:px-10 lg:px-16",style:{maxWidth:1440,paddingTop:88,paddingBottom:88},children:[C.jsxs("div",{className:"grid grid-cols-12 gap-10",children:[C.jsxs("div",{className:"col-span-12 md:col-span-4",children:[C.jsxs("div",{className:"flex items-center mb-6",children:[C.jsx("span",{className:"font-heading font-semibold tracking-[0.18em] text-[20px] text-white",children:"ALRAZAH"}),C.jsx("span",{className:"ml-2 text-[10px] tracking-[0.24em] font-medium uppercase text-[#D49AAE]",children:"Holding"})]}),C.jsx("p",{style:{fontSize:15,lineHeight:1.8,color:"rgba(237,234,230,0.75)",maxWidth:360},children:"A Qatari investment and holding group focused on building enduring businesses, strategic partnerships and long-term value."})]}),t2.map(t=>C.jsxs("div",{className:"col-span-6 md:col-span-2",children:[C.jsx("p",{className:"text-[11px] font-semibold tracking-[0.14em] uppercase mb-5",style:{color:"#D49AAE"},children:t.title}),C.jsx("ul",{className:"flex flex-col gap-3",children:t.links.map(e=>C.jsx("li",{children:C.jsx("a",{href:"#",className:"text-[14px] transition-colors duration-200 hover:text-white",style:{color:"rgba(237,234,230,0.7)"},children:e})},e))})]},t.title)),C.jsxs("div",{className:"col-span-12 md:col-span-2",children:[C.jsx("p",{className:"text-[11px] font-semibold tracking-[0.14em] uppercase mb-5",style:{color:"#D49AAE"},children:"Contact"}),C.jsxs("p",{className:"text-[14px]",style:{color:"rgba(237,234,230,0.7)",lineHeight:1.8},children:["Doha, Qatar",C.jsx("br",{}),C.jsx("a",{href:"/contact",className:"hover:text-white transition-colors duration-200",children:"Get in touch"})]})]})]}),C.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.12)",marginTop:56,paddingTop:28},children:C.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[C.jsx("p",{className:"text-[12px] tracking-[0.12em] uppercase",style:{color:"rgba(237,234,230,0.55)"},children:"© Alrazah Holding"}),C.jsx("div",{className:"flex flex-wrap gap-6",children:["Privacy Policy","Terms of Use","Cookie Policy"].map(t=>C.jsx("a",{href:"#",className:"text-[12px] tracking-[0.08em] uppercase transition-colors duration-200 hover:text-white",style:{color:"rgba(237,234,230,0.55)"},children:t},t))})]})})]})})}function r2(){return T.useEffect(()=>{document.title="Executive Management | Alrazah Holding";const t=document.querySelector('meta[name="description"]');t&&t.setAttribute("content","Meet the executive management team responsible for driving Alrazah Holding's strategy, operational performance and long-term growth across Qatar and international markets.")},[]),C.jsxs("main",{children:[C.jsx(hO,{}),C.jsx(QM,{}),C.jsx(GM,{}),C.jsx(YM,{}),C.jsx(JM,{}),C.jsx(ZM,{}),C.jsx(e2,{}),C.jsx(n2,{})]})}const s2=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:n,navigateToLogin:s}=uO();if(e||t)return C.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:C.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return C.jsx(cO,{});if(n.type==="auth_required")return s(),null}return C.jsxs(uP,{children:[C.jsx(af,{path:"/about-us/leadership/executive-management",element:C.jsx(r2,{})}),C.jsx(af,{path:"*",element:C.jsx(aO,{})})]})};function i2(){return C.jsx(lO,{children:C.jsxs(cC,{client:bC,children:[C.jsxs(fP,{children:[C.jsx(fO,{}),C.jsx(s2,{})]}),C.jsx(j_,{})]})})}Ob.createRoot(document.getElementById("root")).render(C.jsx(i2,{}));